@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.
- package/dist/config/lint/cff-js2-lint.fixture.d.ts.map +1 -1
- package/dist/config/lint/cff-js2-lint.fixture.js +23 -0
- package/dist/config/lint/cff-js2-lint.fixture.js.map +1 -1
- package/dist/config/lint/cff-js2-restriction.d.ts +5 -5
- package/dist/config/lint/cff-js2-restriction.d.ts.map +1 -1
- package/dist/config/lint/cff-js2-restriction.js +11 -5
- package/dist/config/lint/cff-js2-restriction.js.map +1 -1
- package/dist/sdk/router/resolve-sim-sdk-command-router.d.ts.map +1 -1
- package/dist/sdk/router/resolve-sim-sdk-command-router.js +3 -0
- package/dist/sdk/router/resolve-sim-sdk-command-router.js.map +1 -1
- package/dist/service/aws/sim-aws-account-region-scope.d.ts +9 -0
- package/dist/service/aws/sim-aws-account-region-scope.d.ts.map +1 -1
- package/dist/service/aws/sim-aws-account-region-scope.js +10 -0
- package/dist/service/aws/sim-aws-account-region-scope.js.map +1 -1
- package/dist/service/aws/sim-aws-account.d.ts +5 -0
- package/dist/service/aws/sim-aws-account.d.ts.map +1 -1
- package/dist/service/aws/sim-aws-account.js +6 -0
- package/dist/service/aws/sim-aws-account.js.map +1 -1
- package/dist/service/aws/sim-aws-region.d.ts +5 -0
- package/dist/service/aws/sim-aws-region.d.ts.map +1 -1
- package/dist/service/aws/sim-aws-region.js +6 -0
- package/dist/service/aws/sim-aws-region.js.map +1 -1
- package/dist/service/aws/sim-aws-service-accessors.d.ts +5 -0
- package/dist/service/aws/sim-aws-service-accessors.d.ts.map +1 -1
- package/dist/service/aws/sim-aws-service-accessors.js +6 -0
- package/dist/service/aws/sim-aws-service-accessors.js.map +1 -1
- package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-cfn-value-adapter.d.ts.map +1 -1
- package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-cfn-value-adapter.js +8 -0
- package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-cfn-value-adapter.js.map +1 -1
- package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-kvs-cfn.d.ts +28 -0
- package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-kvs-cfn.d.ts.map +1 -0
- package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-kvs-cfn.js +41 -0
- package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-kvs-cfn.js.map +1 -0
- package/dist/service/cloudfront/cff/function-code-input/cff-cloudfront-import.d.ts +21 -0
- package/dist/service/cloudfront/cff/function-code-input/cff-cloudfront-import.d.ts.map +1 -0
- package/dist/service/cloudfront/cff/function-code-input/cff-cloudfront-import.js +30 -0
- package/dist/service/cloudfront/cff/function-code-input/cff-cloudfront-import.js.map +1 -0
- package/dist/service/cloudfront/cff/function-code-input/cff-function-code-input.d.ts +3 -1
- package/dist/service/cloudfront/cff/function-code-input/cff-function-code-input.d.ts.map +1 -1
- package/dist/service/cloudfront/cff/function-code-input/cff-function-code-input.js +5 -17
- package/dist/service/cloudfront/cff/function-code-input/cff-function-code-input.js.map +1 -1
- package/dist/service/cloudfront/cff/function-code-input/cff-vm-source-handler.d.ts +13 -0
- package/dist/service/cloudfront/cff/function-code-input/cff-vm-source-handler.d.ts.map +1 -0
- package/dist/service/cloudfront/cff/function-code-input/cff-vm-source-handler.js +28 -0
- package/dist/service/cloudfront/cff/function-code-input/cff-vm-source-handler.js.map +1 -0
- package/dist/service/cloudfront/cff/kvs/cff-cloudfront-module.d.ts +28 -0
- package/dist/service/cloudfront/cff/kvs/cff-cloudfront-module.d.ts.map +1 -0
- package/dist/service/cloudfront/cff/kvs/cff-cloudfront-module.js +30 -0
- package/dist/service/cloudfront/cff/kvs/cff-cloudfront-module.js.map +1 -0
- package/dist/service/cloudfront/cff/kvs/cff-kvs-handle.d.ts +46 -0
- package/dist/service/cloudfront/cff/kvs/cff-kvs-handle.d.ts.map +1 -0
- package/dist/service/cloudfront/cff/kvs/cff-kvs-handle.js +60 -0
- package/dist/service/cloudfront/cff/kvs/cff-kvs-handle.js.map +1 -0
- package/dist/service/cloudfront/cff/kvs/sim-cff-cloudfront-global.d.ts +43 -0
- package/dist/service/cloudfront/cff/kvs/sim-cff-cloudfront-global.d.ts.map +1 -0
- package/dist/service/cloudfront/cff/kvs/sim-cff-cloudfront-global.js +66 -0
- package/dist/service/cloudfront/cff/kvs/sim-cff-cloudfront-global.js.map +1 -0
- package/dist/service/cloudfront/cff/kvs/sim-cff-key-value-store-users.d.ts +20 -0
- package/dist/service/cloudfront/cff/kvs/sim-cff-key-value-store-users.d.ts.map +1 -0
- package/dist/service/cloudfront/cff/kvs/sim-cff-key-value-store-users.js +25 -0
- package/dist/service/cloudfront/cff/kvs/sim-cff-key-value-store-users.js.map +1 -0
- package/dist/service/cloudfront/cff/sim-cloudfront-function.d.ts +23 -2
- package/dist/service/cloudfront/cff/sim-cloudfront-function.d.ts.map +1 -1
- package/dist/service/cloudfront/cff/sim-cloudfront-function.js +30 -4
- package/dist/service/cloudfront/cff/sim-cloudfront-function.js.map +1 -1
- package/dist/service/cloudfront/cfn/cff/sim-cfn-cff-function-config.d.ts +6 -0
- package/dist/service/cloudfront/cfn/cff/sim-cfn-cff-function-config.d.ts.map +1 -1
- package/dist/service/cloudfront/cfn/cff/sim-cfn-cff-function-config.js +43 -0
- package/dist/service/cloudfront/cfn/cff/sim-cfn-cff-function-config.js.map +1 -1
- package/dist/service/cloudfront/cfn/key-value-store/sim-cfn-cf-kvs-config.d.ts +38 -0
- package/dist/service/cloudfront/cfn/key-value-store/sim-cfn-cf-kvs-config.d.ts.map +1 -0
- package/dist/service/cloudfront/cfn/key-value-store/sim-cfn-cf-kvs-config.js +49 -0
- package/dist/service/cloudfront/cfn/key-value-store/sim-cfn-cf-kvs-config.js.map +1 -0
- package/dist/service/cloudfront/cfn/key-value-store/sim-cfn-cf-kvs-creator.d.ts +33 -0
- package/dist/service/cloudfront/cfn/key-value-store/sim-cfn-cf-kvs-creator.d.ts.map +1 -0
- package/dist/service/cloudfront/cfn/key-value-store/sim-cfn-cf-kvs-creator.js +54 -0
- package/dist/service/cloudfront/cfn/key-value-store/sim-cfn-cf-kvs-creator.js.map +1 -0
- package/dist/service/cloudfront/cfn/sim-cfn-cloudfront-resource-factory.d.ts +1 -0
- package/dist/service/cloudfront/cfn/sim-cfn-cloudfront-resource-factory.d.ts.map +1 -1
- package/dist/service/cloudfront/cfn/sim-cfn-cloudfront-resource-factory.js +12 -0
- package/dist/service/cloudfront/cfn/sim-cfn-cloudfront-resource-factory.js.map +1 -1
- package/dist/service/cloudfront/command/create-distribution/create-distribution.command.d.ts +6 -0
- package/dist/service/cloudfront/command/create-distribution/create-distribution.command.d.ts.map +1 -1
- package/dist/service/cloudfront/command/create-distribution/sim-cf-distro-config-normalizer.d.ts.map +1 -1
- package/dist/service/cloudfront/command/create-distribution/sim-cf-distro-config-normalizer.js +8 -6
- package/dist/service/cloudfront/command/create-distribution/sim-cf-distro-config-normalizer.js.map +1 -1
- package/dist/service/cloudfront/command/create-function/create-function-kvs-association.d.ts +24 -0
- package/dist/service/cloudfront/command/create-function/create-function-kvs-association.d.ts.map +1 -0
- package/dist/service/cloudfront/command/create-function/create-function-kvs-association.js +50 -0
- package/dist/service/cloudfront/command/create-function/create-function-kvs-association.js.map +1 -0
- package/dist/service/cloudfront/command/create-function/create-function.command.d.ts +6 -0
- package/dist/service/cloudfront/command/create-function/create-function.command.d.ts.map +1 -1
- package/dist/service/cloudfront/command/create-function/create-function.handler.d.ts +3 -0
- package/dist/service/cloudfront/command/create-function/create-function.handler.d.ts.map +1 -1
- package/dist/service/cloudfront/command/create-function/create-function.handler.js +11 -2
- package/dist/service/cloudfront/command/create-function/create-function.handler.js.map +1 -1
- package/dist/service/cloudfront/command/key-value-store/sim-cf-create-key-value-store.d.ts +24 -0
- package/dist/service/cloudfront/command/key-value-store/sim-cf-create-key-value-store.d.ts.map +1 -0
- package/dist/service/cloudfront/command/key-value-store/sim-cf-create-key-value-store.js +43 -0
- package/dist/service/cloudfront/command/key-value-store/sim-cf-create-key-value-store.js.map +1 -0
- package/dist/service/cloudfront/command/key-value-store/sim-cf-delete-key-value-store.d.ts +26 -0
- package/dist/service/cloudfront/command/key-value-store/sim-cf-delete-key-value-store.d.ts.map +1 -0
- package/dist/service/cloudfront/command/key-value-store/sim-cf-delete-key-value-store.js +40 -0
- package/dist/service/cloudfront/command/key-value-store/sim-cf-delete-key-value-store.js.map +1 -0
- package/dist/service/cloudfront/command/key-value-store/sim-cf-describe-key-value-store.d.ts +24 -0
- package/dist/service/cloudfront/command/key-value-store/sim-cf-describe-key-value-store.d.ts.map +1 -0
- package/dist/service/cloudfront/command/key-value-store/sim-cf-describe-key-value-store.js +32 -0
- package/dist/service/cloudfront/command/key-value-store/sim-cf-describe-key-value-store.js.map +1 -0
- package/dist/service/cloudfront/command/key-value-store/sim-cf-key-value-store-command.types.d.ts +109 -0
- package/dist/service/cloudfront/command/key-value-store/sim-cf-key-value-store-command.types.d.ts.map +1 -0
- package/dist/service/cloudfront/command/key-value-store/sim-cf-key-value-store-command.types.js +12 -0
- package/dist/service/cloudfront/command/key-value-store/sim-cf-key-value-store-command.types.js.map +1 -0
- package/dist/service/cloudfront/command/key-value-store/sim-cf-key-value-store-summary.d.ts +10 -0
- package/dist/service/cloudfront/command/key-value-store/sim-cf-key-value-store-summary.d.ts.map +1 -0
- package/dist/service/cloudfront/command/key-value-store/sim-cf-key-value-store-summary.js +17 -0
- package/dist/service/cloudfront/command/key-value-store/sim-cf-key-value-store-summary.js.map +1 -0
- package/dist/service/cloudfront/command/key-value-store/sim-cf-list-key-value-stores.d.ts +20 -0
- package/dist/service/cloudfront/command/key-value-store/sim-cf-list-key-value-stores.d.ts.map +1 -0
- package/dist/service/cloudfront/command/key-value-store/sim-cf-list-key-value-stores.js +34 -0
- package/dist/service/cloudfront/command/key-value-store/sim-cf-list-key-value-stores.js.map +1 -0
- package/dist/service/cloudfront/command/key-value-store/sim-cf-update-key-value-store.d.ts +24 -0
- package/dist/service/cloudfront/command/key-value-store/sim-cf-update-key-value-store.d.ts.map +1 -0
- package/dist/service/cloudfront/command/key-value-store/sim-cf-update-key-value-store.js +35 -0
- package/dist/service/cloudfront/command/key-value-store/sim-cf-update-key-value-store.js.map +1 -0
- package/dist/service/cloudfront/command/key-value-store-data/sim-cf-key-value-store-data-command.types.d.ts +116 -0
- package/dist/service/cloudfront/command/key-value-store-data/sim-cf-key-value-store-data-command.types.d.ts.map +1 -0
- package/dist/service/cloudfront/command/key-value-store-data/sim-cf-key-value-store-data-command.types.js +12 -0
- package/dist/service/cloudfront/command/key-value-store-data/sim-cf-key-value-store-data-command.types.js.map +1 -0
- package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-batch.d.ts +22 -0
- package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-batch.d.ts.map +1 -0
- package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-batch.js +26 -0
- package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-batch.js.map +1 -0
- package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-key-reads.d.ts +37 -0
- package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-key-reads.d.ts.map +1 -0
- package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-key-reads.js +67 -0
- package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-key-reads.js.map +1 -0
- package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-key-writes.d.ts +43 -0
- package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-key-writes.d.ts.map +1 -0
- package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-key-writes.js +81 -0
- package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-key-writes.js.map +1 -0
- package/dist/service/cloudfront/command/sim-cf-list-quantity.d.ts +20 -0
- package/dist/service/cloudfront/command/sim-cf-list-quantity.d.ts.map +1 -0
- package/dist/service/cloudfront/command/sim-cf-list-quantity.js +36 -0
- package/dist/service/cloudfront/command/sim-cf-list-quantity.js.map +1 -0
- package/dist/service/cloudfront/controller/cff/sim-cff-applicator.d.ts +2 -2
- package/dist/service/cloudfront/controller/cff/sim-cff-applicator.d.ts.map +1 -1
- package/dist/service/cloudfront/controller/cff/sim-cff-applicator.js +6 -6
- package/dist/service/cloudfront/controller/cff/sim-cff-applicator.js.map +1 -1
- package/dist/service/cloudfront/controller/sim-cloudfront-request-pipeline.js +2 -2
- package/dist/service/cloudfront/controller/sim-cloudfront-request-pipeline.js.map +1 -1
- package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-properties.d.ts.map +1 -1
- package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-properties.js +5 -3
- package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-properties.js.map +1 -1
- package/dist/service/cloudfront/error/sim-cf-key-value-store.error.d.ts +88 -0
- package/dist/service/cloudfront/error/sim-cf-key-value-store.error.d.ts.map +1 -0
- package/dist/service/cloudfront/error/sim-cf-key-value-store.error.js +104 -0
- package/dist/service/cloudfront/error/sim-cf-key-value-store.error.js.map +1 -0
- package/dist/service/cloudfront/error/sim-cloudfront.error.d.ts +10 -0
- package/dist/service/cloudfront/error/sim-cloudfront.error.d.ts.map +1 -1
- package/dist/service/cloudfront/error/sim-cloudfront.error.js +12 -0
- package/dist/service/cloudfront/error/sim-cloudfront.error.js.map +1 -1
- package/dist/service/cloudfront/globals.d.ts +12 -0
- package/dist/service/cloudfront/globals.d.ts.map +1 -1
- package/dist/service/cloudfront/globals.js.map +1 -1
- package/dist/service/cloudfront/index.d.ts +3 -0
- package/dist/service/cloudfront/index.d.ts.map +1 -1
- package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-access.d.ts +57 -0
- package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-access.d.ts.map +1 -0
- package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-access.js +72 -0
- package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-access.js.map +1 -0
- package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-commands.d.ts +51 -0
- package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-commands.d.ts.map +1 -0
- package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-commands.js +65 -0
- package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-commands.js.map +1 -0
- package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-keys.d.ts +72 -0
- package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-keys.d.ts.map +1 -0
- package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-keys.js +94 -0
- package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-keys.js.map +1 -0
- package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-registry.d.ts +59 -0
- package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-registry.d.ts.map +1 -0
- package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-registry.js +92 -0
- package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-registry.js.map +1 -0
- package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-users.d.ts +24 -0
- package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-users.d.ts.map +1 -0
- package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-users.js +7 -0
- package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-users.js.map +1 -0
- package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store.d.ts +141 -0
- package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store.d.ts.map +1 -0
- package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store.js +180 -0
- package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store.js.map +1 -0
- package/dist/service/cloudfront/sdk/sim-cf-key-value-store-sdk-command-router.d.ts +24 -0
- package/dist/service/cloudfront/sdk/sim-cf-key-value-store-sdk-command-router.d.ts.map +1 -0
- package/dist/service/cloudfront/sdk/sim-cf-key-value-store-sdk-command-router.js +54 -0
- package/dist/service/cloudfront/sdk/sim-cf-key-value-store-sdk-command-router.js.map +1 -0
- package/dist/service/cloudfront/sdk/sim-cloudfront-sdk-command-router.d.ts.map +1 -1
- package/dist/service/cloudfront/sdk/sim-cloudfront-sdk-command-router.js +30 -0
- package/dist/service/cloudfront/sdk/sim-cloudfront-sdk-command-router.js.map +1 -1
- package/dist/service/cloudfront/sim-cloudfront-commands.d.ts +10 -0
- package/dist/service/cloudfront/sim-cloudfront-commands.d.ts.map +1 -1
- package/dist/service/cloudfront/sim-cloudfront-commands.js +25 -0
- package/dist/service/cloudfront/sim-cloudfront-commands.js.map +1 -1
- package/dist/service/cloudfront/sim-cloudfront-key-value-store.d.ts +58 -0
- package/dist/service/cloudfront/sim-cloudfront-key-value-store.d.ts.map +1 -0
- package/dist/service/cloudfront/sim-cloudfront-key-value-store.js +68 -0
- package/dist/service/cloudfront/sim-cloudfront-key-value-store.js.map +1 -0
- package/dist/service/cloudfront/sim-cloudfront.d.ts +14 -1
- package/dist/service/cloudfront/sim-cloudfront.d.ts.map +1 -1
- package/dist/service/cloudfront/sim-cloudfront.js +15 -0
- package/dist/service/cloudfront/sim-cloudfront.js.map +1 -1
- package/dist/service/cloudfront/typings/cloudfront-functions.namespace.d.ts +9 -2
- package/dist/service/cloudfront/typings/cloudfront-functions.namespace.d.ts.map +1 -1
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-function.handler.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/create-function/create-function.handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,KAAK,EACV,wBAAwB,EACxB,8BAA8B,EAC/B,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,qBAAqB,EACrB,KAAK,yBAAyB,EAC/B,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"create-function.handler.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/create-function/create-function.handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,KAAK,EACV,wBAAwB,EACxB,8BAA8B,EAC/B,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,qBAAqB,EACrB,KAAK,yBAAyB,EAC/B,MAAM,sCAAsC,CAAC;AAG9C,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,wDAAwD,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAG1E,OAAO,EAAE,kCAAkC,EAAE,MAAM,0DAA0D,CAAC;AAE9G,MAAM,MAAM,wBAAwB,GAAG,GAAG,CACxC,yBAAyB,EACzB,qBAAqB,CACtB,CAAC;AAEF,UAAU,sCAAsC;IAC9C,SAAS,EAAE,eAAe,CAAC;IAC3B,mBAAmB,CAAC,EAAE,wBAAwB,CAAC;IAC/C,GAAG,CAAC,EAAE,uBAAuB,CAAC;IAC9B,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC,cAAc,CAAC,EAAE,kCAAkC,CAAC;CACrD;AAED,UAAU,mCAAmC;IAC3C,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;CAChC;AAED;;;;GAIG;AACH,qBAAa,4BAA6B,YAAW,cAAc,CACjE,wBAAwB,EACxB,8BAA8B,CAC/B;IACC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAkB;IAC5C,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAA2B;IAC/D,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA2B;IACtD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAsB;IACjD,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAyC;IAElF,YAAY,UAAU,EAAE,sCAAsC,EAkB7D;IAED;;OAEG;IACG,MAAM,CACV,OAAO,EAAE,wBAAwB,EACjC,OAAO,CAAC,EAAE,mCAAmC,GAC5C,OAAO,CAAC,8BAA8B,CAAC,CA8CzC;CACF"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { assertDefined } from "../../../../util/type-guard/defined.js";
|
|
2
2
|
import { SimCloudFrontFunction, } from "../../cff/sim-cloudfront-function.js";
|
|
3
3
|
import { CffUint8ArrayFunctionCodeExtractor } from "../../cff/function-code-input/cff-function-code-input.js";
|
|
4
|
+
import { cffCloudFrontModule } from "../../cff/kvs/cff-cloudfront-module.js";
|
|
4
5
|
import { BackgroundTasks, } from "../../../../util/background/background.js";
|
|
5
6
|
import { SimIamAllowAllAuth, } from "../../../iam/authorize/sim-iam-inter-service-auth-z.js";
|
|
6
7
|
import { CreateFunctionAuthorizer } from "./create-function-authorizer.js";
|
|
8
|
+
import { CreateFunctionKeyValueStoreAssociation } from "./create-function-kvs-association.js";
|
|
9
|
+
import { SimCloudFrontKeyValueStoreRegistry } from "../../key-value-store/sim-cf-key-value-store-registry.js";
|
|
7
10
|
/**
|
|
8
11
|
* Simulated CloudFront CreateFunctionCommand handler.
|
|
9
12
|
*
|
|
@@ -14,8 +17,9 @@ export class CreateFunctionCommandHandler {
|
|
|
14
17
|
cloudFrontFunctions;
|
|
15
18
|
authorizer;
|
|
16
19
|
background;
|
|
20
|
+
keyValueStoreAssociation;
|
|
17
21
|
constructor(properties) {
|
|
18
|
-
const { accountId, cloudFrontFunctions = new Map(), iam = new SimIamAllowAllAuth(), background = new BackgroundTasks(), } = properties;
|
|
22
|
+
const { accountId, cloudFrontFunctions = new Map(), iam = new SimIamAllowAllAuth(), background = new BackgroundTasks(), keyValueStores = new SimCloudFrontKeyValueStoreRegistry(), } = properties;
|
|
19
23
|
this.accountId = accountId;
|
|
20
24
|
this.cloudFrontFunctions = cloudFrontFunctions;
|
|
21
25
|
this.authorizer = new CreateFunctionAuthorizer({
|
|
@@ -23,6 +27,7 @@ export class CreateFunctionCommandHandler {
|
|
|
23
27
|
iam,
|
|
24
28
|
});
|
|
25
29
|
this.background = background;
|
|
30
|
+
this.keyValueStoreAssociation = new CreateFunctionKeyValueStoreAssociation(keyValueStores);
|
|
26
31
|
}
|
|
27
32
|
/**
|
|
28
33
|
* Create a sim CloudFront Function.
|
|
@@ -33,12 +38,16 @@ export class CreateFunctionCommandHandler {
|
|
|
33
38
|
// Allow for potential non-deterministic sequencing of async events.
|
|
34
39
|
await this.background.sequence();
|
|
35
40
|
this.authorizer.authorize(command.input.Name, options?.caller);
|
|
36
|
-
const
|
|
41
|
+
const keyValueStore = this.keyValueStoreAssociation.resolve(command.input.Name, command.input.FunctionConfig);
|
|
42
|
+
// The extractor is given the store so that source code running in the vm
|
|
43
|
+
// sandbox gets a `cf` bound to this Function's own association.
|
|
44
|
+
const extractor = new CffUint8ArrayFunctionCodeExtractor(command.input.FunctionCode, cffCloudFrontModule(keyValueStore));
|
|
37
45
|
const handlerFunction = extractor.extractHandlerFunction();
|
|
38
46
|
const simCff = new SimCloudFrontFunction({
|
|
39
47
|
name: command.input.Name,
|
|
40
48
|
accountId: this.accountId,
|
|
41
49
|
handlerFunction,
|
|
50
|
+
keyValueStore,
|
|
42
51
|
});
|
|
43
52
|
this.cloudFrontFunctions.set(simCff.name, simCff);
|
|
44
53
|
// New CFF becomes available async in background.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-function.handler.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/create-function/create-function.handler.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EACL,qBAAqB,GAEtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,kCAAkC,EAAE,MAAM,0DAA0D,CAAC;AAC9G,OAAO,EAEL,eAAe,GAChB,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EACL,kBAAkB,GAEnB,MAAM,wDAAwD,CAAC;AAEhE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"create-function.handler.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/create-function/create-function.handler.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EACL,qBAAqB,GAEtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,kCAAkC,EAAE,MAAM,0DAA0D,CAAC;AAC9G,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAEL,eAAe,GAChB,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EACL,kBAAkB,GAEnB,MAAM,wDAAwD,CAAC;AAEhE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,sCAAsC,EAAE,MAAM,sCAAsC,CAAC;AAC9F,OAAO,EAAE,kCAAkC,EAAE,MAAM,0DAA0D,CAAC;AAmB9G;;;;GAIG;AACH,MAAM,OAAO,4BAA4B;IAItB,SAAS,CAAkB;IAC3B,mBAAmB,CAA2B;IAC9C,UAAU,CAA2B;IACrC,UAAU,CAAsB;IAChC,wBAAwB,CAAyC;IAElF,YAAY,UAAkD;QAC5D,MAAM,EACJ,SAAS,EACT,mBAAmB,GAAG,IAAI,GAAG,EAA8B,EAC3D,GAAG,GAAG,IAAI,kBAAkB,EAAE,EAC9B,UAAU,GAAG,IAAI,eAAe,EAAE,EAClC,cAAc,GAAG,IAAI,kCAAkC,EAAE,GAC1D,GAAG,UAAU,CAAC;QACf,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;QAC/C,IAAI,CAAC,UAAU,GAAG,IAAI,wBAAwB,CAAC;YAC7C,SAAS;YACT,GAAG;SACJ,CAAC,CAAC;QACH,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,wBAAwB,GAAG,IAAI,sCAAsC,CACxE,cAAc,CACf,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,OAAiC,EACjC,OAA6C;QAE7C,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,kCAAkC,CAAC,CAAC;QACtE,aAAa,CACX,OAAO,CAAC,KAAK,CAAC,YAAY,EAC1B,0CAA0C,CAC3C,CAAC;QAEF,oEAAoE;QACpE,MAAM,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QAEjC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAE/D,MAAM,aAAa,GAAG,IAAI,CAAC,wBAAwB,CAAC,OAAO,CACzD,OAAO,CAAC,KAAK,CAAC,IAAI,EAClB,OAAO,CAAC,KAAK,CAAC,cAAc,CAC7B,CAAC;QAEF,yEAAyE;QACzE,gEAAgE;QAChE,MAAM,SAAS,GAAG,IAAI,kCAAkC,CACtD,OAAO,CAAC,KAAK,CAAC,YAAY,EAC1B,mBAAmB,CAAC,aAAa,CAAC,CACnC,CAAC;QACF,MAAM,eAAe,GAAG,SAAS,CAAC,sBAAsB,EAAE,CAAC;QAC3D,MAAM,MAAM,GAAG,IAAI,qBAAqB,CAAC;YACvC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI;YACxB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,eAAe;YACf,aAAa;SACd,CAAC,CAAC;QAEH,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAElD,iDAAiD;QACjD,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;QAEjD,OAAO;YACL,SAAS,EAAE,EAAE;YACb,eAAe,EAAE;gBACf,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,MAAM,EAAE,MAAM,CAAC,MAAM;aACtB;YACD,gBAAgB,EAAE;gBAChB,WAAW,EAAE,MAAM,CAAC,GAAG;aACxB;SACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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 { SimCreateKeyValueStoreCommand, SimCreateKeyValueStoreCommandOutput } from "./sim-cf-key-value-store-command.types.js";
|
|
4
|
+
/**
|
|
5
|
+
* Simulated CloudFront CreateKeyValueStore command.
|
|
6
|
+
*
|
|
7
|
+
* A new store is PROVISIONING when the command returns and becomes READY in
|
|
8
|
+
* the background, which is what CloudFront does: the store exists immediately
|
|
9
|
+
* but is not servable until provisioning finishes.
|
|
10
|
+
*
|
|
11
|
+
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront/command/CreateKeyValueStoreCommand/
|
|
12
|
+
*/
|
|
13
|
+
export declare class SimCfCreateKeyValueStore {
|
|
14
|
+
private readonly access;
|
|
15
|
+
private static readonly action;
|
|
16
|
+
constructor(access: SimCfKeyValueStoreAccess);
|
|
17
|
+
/**
|
|
18
|
+
* Create a sim CloudFront key value store.
|
|
19
|
+
*/
|
|
20
|
+
handle(command: SimCreateKeyValueStoreCommand, options?: {
|
|
21
|
+
readonly caller?: SimAwsCaller;
|
|
22
|
+
}): Promise<SimCreateKeyValueStoreCommandOutput>;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=sim-cf-create-key-value-store.d.ts.map
|
package/dist/service/cloudfront/command/key-value-store/sim-cf-create-key-value-store.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cf-create-key-value-store.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store/sim-cf-create-key-value-store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wDAAwD,CAAC;AAGvG,OAAO,KAAK,EACV,6BAA6B,EAC7B,mCAAmC,EACpC,MAAM,2CAA2C,CAAC;AAEnD;;;;;;;;GAQG;AACH,qBAAa,wBAAwB;IAGvB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAoC;IAElE,YAA6B,MAAM,EAAE,wBAAwB,EAAI;IAEjE;;OAEG;IACG,MAAM,CACV,OAAO,EAAE,6BAA6B,EACtC,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAA;KAAE,GAC3C,OAAO,CAAC,mCAAmC,CAAC,CA4B9C;CACF"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { assertDefined } from "../../../../util/type-guard/defined.js";
|
|
2
|
+
import { SimCloudFrontKeyValueStore } from "../../key-value-store/sim-cf-key-value-store.js";
|
|
3
|
+
import { simCfKeyValueStoreSummary } from "./sim-cf-key-value-store-summary.js";
|
|
4
|
+
/**
|
|
5
|
+
* Simulated CloudFront CreateKeyValueStore command.
|
|
6
|
+
*
|
|
7
|
+
* A new store is PROVISIONING when the command returns and becomes READY in
|
|
8
|
+
* the background, which is what CloudFront does: the store exists immediately
|
|
9
|
+
* but is not servable until provisioning finishes.
|
|
10
|
+
*
|
|
11
|
+
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront/command/CreateKeyValueStoreCommand/
|
|
12
|
+
*/
|
|
13
|
+
export class SimCfCreateKeyValueStore {
|
|
14
|
+
access;
|
|
15
|
+
static action = "cloudfront:CreateKeyValueStore";
|
|
16
|
+
constructor(access) {
|
|
17
|
+
this.access = access;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Create a sim CloudFront key value store.
|
|
21
|
+
*/
|
|
22
|
+
async handle(command, options) {
|
|
23
|
+
assertDefined(command.input.Name, "CreateKeyValueStoreCommand.input.Name");
|
|
24
|
+
await this.access.background.sequence();
|
|
25
|
+
this.access.authorizeAnyStore(SimCfCreateKeyValueStore.action, options?.caller);
|
|
26
|
+
const store = new SimCloudFrontKeyValueStore({
|
|
27
|
+
name: command.input.Name,
|
|
28
|
+
comment: command.input.Comment,
|
|
29
|
+
accountId: this.access.accountId,
|
|
30
|
+
lastModifiedTime: this.access.background.now(),
|
|
31
|
+
});
|
|
32
|
+
this.access.stores.add(store);
|
|
33
|
+
// A new store becomes servable asynchronously, as in CloudFront.
|
|
34
|
+
this.access.background.schedule(() => store.ready());
|
|
35
|
+
return {
|
|
36
|
+
$metadata: {},
|
|
37
|
+
KeyValueStore: simCfKeyValueStoreSummary(store),
|
|
38
|
+
ETag: store.resourceETag,
|
|
39
|
+
Location: `https://cloudfront.amazonaws.com/2020-05-31/key-value-store/${store.id}`,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=sim-cf-create-key-value-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cf-create-key-value-store.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store/sim-cf-create-key-value-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAGvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAC;AAC7F,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAMhF;;;;;;;;GAQG;AACH,MAAM,OAAO,wBAAwB;IAGN,MAAM;IAF3B,MAAM,CAAU,MAAM,GAAG,gCAAgC,CAAC;IAElE,YAA6B,MAAgC;sBAAhC,MAAM;IAA6B,CAAC;IAEjE;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,OAAsC,EACtC,OAA4C;QAE5C,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,uCAAuC,CAAC,CAAC;QAE3E,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QAExC,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAC3B,wBAAwB,CAAC,MAAM,EAC/B,OAAO,EAAE,MAAM,CAChB,CAAC;QAEF,MAAM,KAAK,GAAG,IAAI,0BAA0B,CAAC;YAC3C,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI;YACxB,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,OAAO;YAC9B,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS;YAChC,gBAAgB,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE;SAC/C,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAE9B,iEAAiE;QACjE,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;QAErD,OAAO;YACL,SAAS,EAAE,EAAE;YACb,aAAa,EAAE,yBAAyB,CAAC,KAAK,CAAC;YAC/C,IAAI,EAAE,KAAK,CAAC,YAAY;YACxB,QAAQ,EAAE,+DAA+D,KAAK,CAAC,EAAE,EAAE;SACpF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
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 { SimCfKeyValueStoreUsers } from "../../key-value-store/sim-cf-key-value-store-users.js";
|
|
4
|
+
import type { SimDeleteKeyValueStoreCommand, SimDeleteKeyValueStoreCommandOutput } from "./sim-cf-key-value-store-command.types.js";
|
|
5
|
+
/**
|
|
6
|
+
* Simulated CloudFront DeleteKeyValueStore command.
|
|
7
|
+
*
|
|
8
|
+
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront/command/DeleteKeyValueStoreCommand/
|
|
9
|
+
*/
|
|
10
|
+
export declare class SimCfDeleteKeyValueStore {
|
|
11
|
+
private readonly access;
|
|
12
|
+
private readonly users;
|
|
13
|
+
private static readonly action;
|
|
14
|
+
constructor(access: SimCfKeyValueStoreAccess, users: SimCfKeyValueStoreUsers);
|
|
15
|
+
/**
|
|
16
|
+
* Delete a sim CloudFront key value store.
|
|
17
|
+
*/
|
|
18
|
+
handle(command: SimDeleteKeyValueStoreCommand, options?: {
|
|
19
|
+
readonly caller?: SimAwsCaller;
|
|
20
|
+
}): Promise<SimDeleteKeyValueStoreCommandOutput>;
|
|
21
|
+
/**
|
|
22
|
+
* CloudFront will not delete a store a Function is still associated with.
|
|
23
|
+
*/
|
|
24
|
+
private assertNotInUse;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=sim-cf-delete-key-value-store.d.ts.map
|
package/dist/service/cloudfront/command/key-value-store/sim-cf-delete-key-value-store.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cf-delete-key-value-store.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store/sim-cf-delete-key-value-store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAE1E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wDAAwD,CAAC;AAEvG,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uDAAuD,CAAC;AACrG,OAAO,KAAK,EACV,6BAA6B,EAC7B,mCAAmC,EACpC,MAAM,2CAA2C,CAAC;AAEnD;;;;GAIG;AACH,qBAAa,wBAAwB;IAIjC,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,KAAK;IAJxB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAoC;IAElE,YACmB,MAAM,EAAE,wBAAwB,EAChC,KAAK,EAAE,uBAAuB,EAC7C;IAEJ;;OAEG;IACG,MAAM,CACV,OAAO,EAAE,6BAA6B,EACtC,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAA;KAAE,GAC3C,OAAO,CAAC,mCAAmC,CAAC,CAqB9C;IAED;;OAEG;IACH,OAAO,CAAC,cAAc;CAavB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { assertDefined } from "../../../../util/type-guard/defined.js";
|
|
2
|
+
import { SimCloudFrontCannotDeleteEntityWhileInUse } from "../../error/sim-cf-key-value-store.error.js";
|
|
3
|
+
/**
|
|
4
|
+
* Simulated CloudFront DeleteKeyValueStore command.
|
|
5
|
+
*
|
|
6
|
+
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront/command/DeleteKeyValueStoreCommand/
|
|
7
|
+
*/
|
|
8
|
+
export class SimCfDeleteKeyValueStore {
|
|
9
|
+
access;
|
|
10
|
+
users;
|
|
11
|
+
static action = "cloudfront:DeleteKeyValueStore";
|
|
12
|
+
constructor(access, users) {
|
|
13
|
+
this.access = access;
|
|
14
|
+
this.users = users;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Delete a sim CloudFront key value store.
|
|
18
|
+
*/
|
|
19
|
+
async handle(command, options) {
|
|
20
|
+
assertDefined(command.input.Name, "DeleteKeyValueStoreCommand.input.Name");
|
|
21
|
+
assertDefined(command.input.IfMatch, "DeleteKeyValueStoreCommand.input.IfMatch");
|
|
22
|
+
await this.access.background.sequence();
|
|
23
|
+
const store = this.access.authorizedByName(SimCfDeleteKeyValueStore.action, command.input.Name, options?.caller);
|
|
24
|
+
store.assertResourceETag(command.input.IfMatch);
|
|
25
|
+
this.assertNotInUse(store.id, store.name);
|
|
26
|
+
this.access.stores.remove(store.id);
|
|
27
|
+
return { $metadata: {} };
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* CloudFront will not delete a store a Function is still associated with.
|
|
31
|
+
*/
|
|
32
|
+
assertNotInUse(storeId, storeName) {
|
|
33
|
+
const functions = this.users.functionsUsing(storeId);
|
|
34
|
+
if (functions.length > 0) {
|
|
35
|
+
throw new SimCloudFrontCannotDeleteEntityWhileInUse(`Sim CloudFront key value store ${storeName} is still associated with ` +
|
|
36
|
+
`CloudFront Function ${functions.join(", ")}`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=sim-cf-delete-key-value-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cf-delete-key-value-store.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store/sim-cf-delete-key-value-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAEvE,OAAO,EAAE,yCAAyC,EAAE,MAAM,6CAA6C,CAAC;AASxG;;;;GAIG;AACH,MAAM,OAAO,wBAAwB;IAIhB,MAAM;IACN,KAAK;IAJhB,MAAM,CAAU,MAAM,GAAG,gCAAgC,CAAC;IAElE,YACmB,MAAgC,EAChC,KAA8B;sBAD9B,MAAM;qBACN,KAAK;IACrB,CAAC;IAEJ;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,OAAsC,EACtC,OAA4C;QAE5C,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,uCAAuC,CAAC,CAAC;QAC3E,aAAa,CACX,OAAO,CAAC,KAAK,CAAC,OAAO,EACrB,0CAA0C,CAC3C,CAAC;QAEF,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QAExC,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CACxC,wBAAwB,CAAC,MAAM,EAC/B,OAAO,CAAC,KAAK,CAAC,IAAI,EAClB,OAAO,EAAE,MAAM,CAChB,CAAC;QAEF,KAAK,CAAC,kBAAkB,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAChD,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QAE1C,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAEpC,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;IAC3B,CAAC;IAED;;OAEG;IACK,cAAc,CACpB,OAAqC,EACrC,SAAiB;QAEjB,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QAErD,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACzB,MAAM,IAAI,yCAAyC,CACjD,kCAAkC,SAAS,4BAA4B;gBACrE,uBAAuB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAChD,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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 { SimDescribeKeyValueStoreCommand, SimDescribeKeyValueStoreCommandOutput } from "./sim-cf-key-value-store-command.types.js";
|
|
4
|
+
/**
|
|
5
|
+
* Simulated CloudFront DescribeKeyValueStore command.
|
|
6
|
+
*
|
|
7
|
+
* This is the CloudFront client's describe, which answers with the resource
|
|
8
|
+
* and its ETag. The key value store client has a command of the same name that
|
|
9
|
+
* answers with the data instead: item count, size and status.
|
|
10
|
+
*
|
|
11
|
+
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront/command/DescribeKeyValueStoreCommand/
|
|
12
|
+
*/
|
|
13
|
+
export declare class SimCfDescribeKeyValueStore {
|
|
14
|
+
private readonly access;
|
|
15
|
+
private static readonly action;
|
|
16
|
+
constructor(access: SimCfKeyValueStoreAccess);
|
|
17
|
+
/**
|
|
18
|
+
* Describe a sim CloudFront key value store.
|
|
19
|
+
*/
|
|
20
|
+
handle(command: SimDescribeKeyValueStoreCommand, options?: {
|
|
21
|
+
readonly caller?: SimAwsCaller;
|
|
22
|
+
}): Promise<SimDescribeKeyValueStoreCommandOutput>;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=sim-cf-describe-key-value-store.d.ts.map
|
package/dist/service/cloudfront/command/key-value-store/sim-cf-describe-key-value-store.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cf-describe-key-value-store.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store/sim-cf-describe-key-value-store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wDAAwD,CAAC;AAEvG,OAAO,KAAK,EACV,+BAA+B,EAC/B,qCAAqC,EACtC,MAAM,2CAA2C,CAAC;AAEnD;;;;;;;;GAQG;AACH,qBAAa,0BAA0B;IAGzB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAsC;IAEpE,YAA6B,MAAM,EAAE,wBAAwB,EAAI;IAEjE;;OAEG;IACG,MAAM,CACV,OAAO,EAAE,+BAA+B,EACxC,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAA;KAAE,GAC3C,OAAO,CAAC,qCAAqC,CAAC,CAmBhD;CACF"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { assertDefined } from "../../../../util/type-guard/defined.js";
|
|
2
|
+
import { simCfKeyValueStoreSummary } from "./sim-cf-key-value-store-summary.js";
|
|
3
|
+
/**
|
|
4
|
+
* Simulated CloudFront DescribeKeyValueStore command.
|
|
5
|
+
*
|
|
6
|
+
* This is the CloudFront client's describe, which answers with the resource
|
|
7
|
+
* and its ETag. The key value store client has a command of the same name that
|
|
8
|
+
* answers with the data instead: item count, size and status.
|
|
9
|
+
*
|
|
10
|
+
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront/command/DescribeKeyValueStoreCommand/
|
|
11
|
+
*/
|
|
12
|
+
export class SimCfDescribeKeyValueStore {
|
|
13
|
+
access;
|
|
14
|
+
static action = "cloudfront:DescribeKeyValueStore";
|
|
15
|
+
constructor(access) {
|
|
16
|
+
this.access = access;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Describe a sim CloudFront key value store.
|
|
20
|
+
*/
|
|
21
|
+
async handle(command, options) {
|
|
22
|
+
assertDefined(command.input.Name, "DescribeKeyValueStoreCommand.input.Name");
|
|
23
|
+
await this.access.background.sequence();
|
|
24
|
+
const store = this.access.authorizedByName(SimCfDescribeKeyValueStore.action, command.input.Name, options?.caller);
|
|
25
|
+
return {
|
|
26
|
+
$metadata: {},
|
|
27
|
+
KeyValueStore: simCfKeyValueStoreSummary(store),
|
|
28
|
+
ETag: store.resourceETag,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=sim-cf-describe-key-value-store.js.map
|
package/dist/service/cloudfront/command/key-value-store/sim-cf-describe-key-value-store.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cf-describe-key-value-store.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store/sim-cf-describe-key-value-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAGvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAMhF;;;;;;;;GAQG;AACH,MAAM,OAAO,0BAA0B;IAGR,MAAM;IAF3B,MAAM,CAAU,MAAM,GAAG,kCAAkC,CAAC;IAEpE,YAA6B,MAAgC;sBAAhC,MAAM;IAA6B,CAAC;IAEjE;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,OAAwC,EACxC,OAA4C;QAE5C,aAAa,CACX,OAAO,CAAC,KAAK,CAAC,IAAI,EAClB,yCAAyC,CAC1C,CAAC;QAEF,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QAExC,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CACxC,0BAA0B,CAAC,MAAM,EACjC,OAAO,CAAC,KAAK,CAAC,IAAI,EAClB,OAAO,EAAE,MAAM,CAChB,CAAC;QAEF,OAAO;YACL,SAAS,EAAE,EAAE;YACb,aAAa,EAAE,yBAAyB,CAAC,KAAK,CAAC;YAC/C,IAAI,EAAE,KAAK,CAAC,YAAY;SACzB,CAAC;IACJ,CAAC;CACF"}
|
package/dist/service/cloudfront/command/key-value-store/sim-cf-key-value-store-command.types.d.ts
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structural types for the key value store commands on the CloudFront client.
|
|
3
|
+
*
|
|
4
|
+
* These are the commands that own the resource. They address a store by name,
|
|
5
|
+
* which is what the CloudFront client takes. The commands that read and write
|
|
6
|
+
* the keys are a separate client addressing a store by ARN, and their types
|
|
7
|
+
* live beside them under `command/key-value-store-data/`.
|
|
8
|
+
*
|
|
9
|
+
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront/
|
|
10
|
+
*/
|
|
11
|
+
import type { SimArn } from "../../../aws/arn.js";
|
|
12
|
+
import type { SimResponseMetadata } from "../../../aws/metadata/response-metadata.type.js";
|
|
13
|
+
/**
|
|
14
|
+
* Minimal structural sim CloudFront key value store summary.
|
|
15
|
+
*/
|
|
16
|
+
export interface SimCfKeyValueStoreSummary {
|
|
17
|
+
Id: string;
|
|
18
|
+
Name: string;
|
|
19
|
+
Comment: string | undefined;
|
|
20
|
+
ARN: SimArn;
|
|
21
|
+
Status: string;
|
|
22
|
+
LastModifiedTime: Date;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Minimal structural sim CloudFront CreateKeyValueStore command.
|
|
26
|
+
*/
|
|
27
|
+
export interface SimCreateKeyValueStoreCommand {
|
|
28
|
+
readonly input: {
|
|
29
|
+
readonly Name?: string | undefined;
|
|
30
|
+
readonly Comment?: string | undefined;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Minimal structural sim CloudFront CreateKeyValueStore output.
|
|
35
|
+
*/
|
|
36
|
+
export interface SimCreateKeyValueStoreCommandOutput {
|
|
37
|
+
readonly $metadata: SimResponseMetadata;
|
|
38
|
+
KeyValueStore: SimCfKeyValueStoreSummary;
|
|
39
|
+
ETag: string;
|
|
40
|
+
Location: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Minimal structural sim CloudFront DescribeKeyValueStore command.
|
|
44
|
+
*/
|
|
45
|
+
export interface SimDescribeKeyValueStoreCommand {
|
|
46
|
+
readonly input: {
|
|
47
|
+
readonly Name?: string | undefined;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Minimal structural sim CloudFront DescribeKeyValueStore output.
|
|
52
|
+
*/
|
|
53
|
+
export interface SimDescribeKeyValueStoreCommandOutput {
|
|
54
|
+
readonly $metadata: SimResponseMetadata;
|
|
55
|
+
KeyValueStore: SimCfKeyValueStoreSummary;
|
|
56
|
+
ETag: string;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Minimal structural sim CloudFront ListKeyValueStores command.
|
|
60
|
+
*/
|
|
61
|
+
export interface SimListKeyValueStoresCommand {
|
|
62
|
+
readonly input: {
|
|
63
|
+
readonly Status?: string | undefined;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Minimal structural sim CloudFront ListKeyValueStores output.
|
|
68
|
+
*/
|
|
69
|
+
export interface SimListKeyValueStoresCommandOutput {
|
|
70
|
+
readonly $metadata: SimResponseMetadata;
|
|
71
|
+
KeyValueStoreList: {
|
|
72
|
+
Quantity: number;
|
|
73
|
+
Items: SimCfKeyValueStoreSummary[];
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Minimal structural sim CloudFront UpdateKeyValueStore command.
|
|
78
|
+
*/
|
|
79
|
+
export interface SimUpdateKeyValueStoreCommand {
|
|
80
|
+
readonly input: {
|
|
81
|
+
readonly Name?: string | undefined;
|
|
82
|
+
readonly Comment?: string | undefined;
|
|
83
|
+
readonly IfMatch?: string | undefined;
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Minimal structural sim CloudFront UpdateKeyValueStore output.
|
|
88
|
+
*/
|
|
89
|
+
export interface SimUpdateKeyValueStoreCommandOutput {
|
|
90
|
+
readonly $metadata: SimResponseMetadata;
|
|
91
|
+
KeyValueStore: SimCfKeyValueStoreSummary;
|
|
92
|
+
ETag: string;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Minimal structural sim CloudFront DeleteKeyValueStore command.
|
|
96
|
+
*/
|
|
97
|
+
export interface SimDeleteKeyValueStoreCommand {
|
|
98
|
+
readonly input: {
|
|
99
|
+
readonly Name?: string | undefined;
|
|
100
|
+
readonly IfMatch?: string | undefined;
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Minimal structural sim CloudFront DeleteKeyValueStore output.
|
|
105
|
+
*/
|
|
106
|
+
export interface SimDeleteKeyValueStoreCommandOutput {
|
|
107
|
+
readonly $metadata: SimResponseMetadata;
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=sim-cf-key-value-store-command.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cf-key-value-store-command.types.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store/sim-cf-key-value-store-command.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAE3F;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,IAAI,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,KAAK,EAAE;QACd,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QACnC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KACvC,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;IACxC,aAAa,EAAE,yBAAyB,CAAC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,KAAK,EAAE;QACd,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KACpC,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,qCAAqC;IACpD,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;IACxC,aAAa,EAAE,yBAAyB,CAAC;IACzC,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,KAAK,EAAE;QACd,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KACtC,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;IACxC,iBAAiB,EAAE;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,yBAAyB,EAAE,CAAC;KACpC,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,KAAK,EAAE;QACd,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QACnC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QACtC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KACvC,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;IACxC,aAAa,EAAE,yBAAyB,CAAC;IACzC,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,KAAK,EAAE;QACd,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QACnC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KACvC,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;CACzC"}
|
package/dist/service/cloudfront/command/key-value-store/sim-cf-key-value-store-command.types.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structural types for the key value store commands on the CloudFront client.
|
|
3
|
+
*
|
|
4
|
+
* These are the commands that own the resource. They address a store by name,
|
|
5
|
+
* which is what the CloudFront client takes. The commands that read and write
|
|
6
|
+
* the keys are a separate client addressing a store by ARN, and their types
|
|
7
|
+
* live beside them under `command/key-value-store-data/`.
|
|
8
|
+
*
|
|
9
|
+
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront/
|
|
10
|
+
*/
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=sim-cf-key-value-store-command.types.js.map
|
package/dist/service/cloudfront/command/key-value-store/sim-cf-key-value-store-command.types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cf-key-value-store-command.types.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store/sim-cf-key-value-store-command.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SimCloudFrontKeyValueStore } from "../../key-value-store/sim-cf-key-value-store.js";
|
|
2
|
+
import type { SimCfKeyValueStoreSummary } from "./sim-cf-key-value-store-command.types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Describe a key value store the way every CloudFront client command does.
|
|
5
|
+
*
|
|
6
|
+
* Create, Describe, List and Update all answer with the same summary shape, so
|
|
7
|
+
* it is built in one place rather than four.
|
|
8
|
+
*/
|
|
9
|
+
export declare function simCfKeyValueStoreSummary(store: SimCloudFrontKeyValueStore): SimCfKeyValueStoreSummary;
|
|
10
|
+
//# sourceMappingURL=sim-cf-key-value-store-summary.d.ts.map
|
package/dist/service/cloudfront/command/key-value-store/sim-cf-key-value-store-summary.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cf-key-value-store-summary.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store/sim-cf-key-value-store-summary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAC;AAClG,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AAE3F;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,0BAA0B,GAChC,yBAAyB,CAS3B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Describe a key value store the way every CloudFront client command does.
|
|
3
|
+
*
|
|
4
|
+
* Create, Describe, List and Update all answer with the same summary shape, so
|
|
5
|
+
* it is built in one place rather than four.
|
|
6
|
+
*/
|
|
7
|
+
export function simCfKeyValueStoreSummary(store) {
|
|
8
|
+
return {
|
|
9
|
+
Id: store.id,
|
|
10
|
+
Name: store.name,
|
|
11
|
+
Comment: store.comment,
|
|
12
|
+
ARN: store.arn,
|
|
13
|
+
Status: store.status,
|
|
14
|
+
LastModifiedTime: store.lastModifiedTime,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=sim-cf-key-value-store-summary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cf-key-value-store-summary.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store/sim-cf-key-value-store-summary.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,MAAM,UAAU,yBAAyB,CACvC,KAAiC;IAEjC,OAAO;QACL,EAAE,EAAE,KAAK,CAAC,EAAE;QACZ,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,GAAG,EAAE,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;KACzC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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 { SimListKeyValueStoresCommand, SimListKeyValueStoresCommandOutput } from "./sim-cf-key-value-store-command.types.js";
|
|
4
|
+
/**
|
|
5
|
+
* Simulated CloudFront ListKeyValueStores command.
|
|
6
|
+
*
|
|
7
|
+
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront/command/ListKeyValueStoresCommand/
|
|
8
|
+
*/
|
|
9
|
+
export declare class SimCfListKeyValueStores {
|
|
10
|
+
private readonly access;
|
|
11
|
+
private static readonly action;
|
|
12
|
+
constructor(access: SimCfKeyValueStoreAccess);
|
|
13
|
+
/**
|
|
14
|
+
* List this Account's sim CloudFront key value stores.
|
|
15
|
+
*/
|
|
16
|
+
handle(command: SimListKeyValueStoresCommand, options?: {
|
|
17
|
+
readonly caller?: SimAwsCaller;
|
|
18
|
+
}): Promise<SimListKeyValueStoresCommandOutput>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=sim-cf-list-key-value-stores.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cf-list-key-value-stores.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store/sim-cf-list-key-value-stores.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wDAAwD,CAAC;AAEvG,OAAO,KAAK,EACV,4BAA4B,EAC5B,kCAAkC,EACnC,MAAM,2CAA2C,CAAC;AAEnD;;;;GAIG;AACH,qBAAa,uBAAuB;IAGtB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAmC;IAEjE,YAA6B,MAAM,EAAE,wBAAwB,EAAI;IAEjE;;OAEG;IACG,MAAM,CACV,OAAO,EAAE,4BAA4B,EACrC,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAA;KAAE,GAC3C,OAAO,CAAC,kCAAkC,CAAC,CAsB7C;CACF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { simCfKeyValueStoreSummary } from "./sim-cf-key-value-store-summary.js";
|
|
2
|
+
/**
|
|
3
|
+
* Simulated CloudFront ListKeyValueStores command.
|
|
4
|
+
*
|
|
5
|
+
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront/command/ListKeyValueStoresCommand/
|
|
6
|
+
*/
|
|
7
|
+
export class SimCfListKeyValueStores {
|
|
8
|
+
access;
|
|
9
|
+
static action = "cloudfront:ListKeyValueStores";
|
|
10
|
+
constructor(access) {
|
|
11
|
+
this.access = access;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* List this Account's sim CloudFront key value stores.
|
|
15
|
+
*/
|
|
16
|
+
async handle(command, options) {
|
|
17
|
+
await this.access.background.sequence();
|
|
18
|
+
// Listing is authorized across the Account rather than per store, which is
|
|
19
|
+
// what a policy for this action grants.
|
|
20
|
+
this.access.authorizeAnyStore(SimCfListKeyValueStores.action, options?.caller);
|
|
21
|
+
const status = command.input.Status;
|
|
22
|
+
const stores = this.access.stores
|
|
23
|
+
.all()
|
|
24
|
+
.filter((store) => status === undefined || store.status === status);
|
|
25
|
+
return {
|
|
26
|
+
$metadata: {},
|
|
27
|
+
KeyValueStoreList: {
|
|
28
|
+
Quantity: stores.length,
|
|
29
|
+
Items: stores.map((store) => simCfKeyValueStoreSummary(store)),
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=sim-cf-list-key-value-stores.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cf-list-key-value-stores.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store/sim-cf-list-key-value-stores.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAMhF;;;;GAIG;AACH,MAAM,OAAO,uBAAuB;IAGL,MAAM;IAF3B,MAAM,CAAU,MAAM,GAAG,+BAA+B,CAAC;IAEjE,YAA6B,MAAgC;sBAAhC,MAAM;IAA6B,CAAC;IAEjE;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,OAAqC,EACrC,OAA4C;QAE5C,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QAExC,2EAA2E;QAC3E,wCAAwC;QACxC,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAC3B,uBAAuB,CAAC,MAAM,EAC9B,OAAO,EAAE,MAAM,CAChB,CAAC;QAEF,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC;QACpC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM;aAC9B,GAAG,EAAE;aACL,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC;QAEtE,OAAO;YACL,SAAS,EAAE,EAAE;YACb,iBAAiB,EAAE;gBACjB,QAAQ,EAAE,MAAM,CAAC,MAAM;gBACvB,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,yBAAyB,CAAC,KAAK,CAAC,CAAC;aAC/D;SACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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 { SimUpdateKeyValueStoreCommand, SimUpdateKeyValueStoreCommandOutput } from "./sim-cf-key-value-store-command.types.js";
|
|
4
|
+
/**
|
|
5
|
+
* Simulated CloudFront UpdateKeyValueStore command.
|
|
6
|
+
*
|
|
7
|
+
* Only the comment can be changed. The name identifies the store in this API,
|
|
8
|
+
* so it is what the command looks the store up by rather than something the
|
|
9
|
+
* command can set.
|
|
10
|
+
*
|
|
11
|
+
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront/command/UpdateKeyValueStoreCommand/
|
|
12
|
+
*/
|
|
13
|
+
export declare class SimCfUpdateKeyValueStore {
|
|
14
|
+
private readonly access;
|
|
15
|
+
private static readonly action;
|
|
16
|
+
constructor(access: SimCfKeyValueStoreAccess);
|
|
17
|
+
/**
|
|
18
|
+
* Update a sim CloudFront key value store's comment.
|
|
19
|
+
*/
|
|
20
|
+
handle(command: SimUpdateKeyValueStoreCommand, options?: {
|
|
21
|
+
readonly caller?: SimAwsCaller;
|
|
22
|
+
}): Promise<SimUpdateKeyValueStoreCommandOutput>;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=sim-cf-update-key-value-store.d.ts.map
|
package/dist/service/cloudfront/command/key-value-store/sim-cf-update-key-value-store.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cf-update-key-value-store.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store/sim-cf-update-key-value-store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wDAAwD,CAAC;AAEvG,OAAO,KAAK,EACV,6BAA6B,EAC7B,mCAAmC,EACpC,MAAM,2CAA2C,CAAC;AAEnD;;;;;;;;GAQG;AACH,qBAAa,wBAAwB;IAGvB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAoC;IAElE,YAA6B,MAAM,EAAE,wBAAwB,EAAI;IAEjE;;OAEG;IACG,MAAM,CACV,OAAO,EAAE,6BAA6B,EACtC,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAA;KAAE,GAC3C,OAAO,CAAC,mCAAmC,CAAC,CAuB9C;CACF"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { assertDefined } from "../../../../util/type-guard/defined.js";
|
|
2
|
+
import { simCfKeyValueStoreSummary } from "./sim-cf-key-value-store-summary.js";
|
|
3
|
+
/**
|
|
4
|
+
* Simulated CloudFront UpdateKeyValueStore command.
|
|
5
|
+
*
|
|
6
|
+
* Only the comment can be changed. The name identifies the store in this API,
|
|
7
|
+
* so it is what the command looks the store up by rather than something the
|
|
8
|
+
* command can set.
|
|
9
|
+
*
|
|
10
|
+
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront/command/UpdateKeyValueStoreCommand/
|
|
11
|
+
*/
|
|
12
|
+
export class SimCfUpdateKeyValueStore {
|
|
13
|
+
access;
|
|
14
|
+
static action = "cloudfront:UpdateKeyValueStore";
|
|
15
|
+
constructor(access) {
|
|
16
|
+
this.access = access;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Update a sim CloudFront key value store's comment.
|
|
20
|
+
*/
|
|
21
|
+
async handle(command, options) {
|
|
22
|
+
assertDefined(command.input.Name, "UpdateKeyValueStoreCommand.input.Name");
|
|
23
|
+
assertDefined(command.input.IfMatch, "UpdateKeyValueStoreCommand.input.IfMatch");
|
|
24
|
+
await this.access.background.sequence();
|
|
25
|
+
const store = this.access.authorizedByName(SimCfUpdateKeyValueStore.action, command.input.Name, options?.caller);
|
|
26
|
+
store.assertResourceETag(command.input.IfMatch);
|
|
27
|
+
store.update({ comment: command.input.Comment });
|
|
28
|
+
return {
|
|
29
|
+
$metadata: {},
|
|
30
|
+
KeyValueStore: simCfKeyValueStoreSummary(store),
|
|
31
|
+
ETag: store.resourceETag,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=sim-cf-update-key-value-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cf-update-key-value-store.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store/sim-cf-update-key-value-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAGvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAMhF;;;;;;;;GAQG;AACH,MAAM,OAAO,wBAAwB;IAGN,MAAM;IAF3B,MAAM,CAAU,MAAM,GAAG,gCAAgC,CAAC;IAElE,YAA6B,MAAgC;sBAAhC,MAAM;IAA6B,CAAC;IAEjE;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,OAAsC,EACtC,OAA4C;QAE5C,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,uCAAuC,CAAC,CAAC;QAC3E,aAAa,CACX,OAAO,CAAC,KAAK,CAAC,OAAO,EACrB,0CAA0C,CAC3C,CAAC;QAEF,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QAExC,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CACxC,wBAAwB,CAAC,MAAM,EAC/B,OAAO,CAAC,KAAK,CAAC,IAAI,EAClB,OAAO,EAAE,MAAM,CAChB,CAAC;QAEF,KAAK,CAAC,kBAAkB,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAChD,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QAEjD,OAAO;YACL,SAAS,EAAE,EAAE;YACb,aAAa,EAAE,yBAAyB,CAAC,KAAK,CAAC;YAC/C,IAAI,EAAE,KAAK,CAAC,YAAY;SACzB,CAAC;IACJ,CAAC;CACF"}
|