@kensio/yulin 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.d.ts +2 -2
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.d.ts.map +1 -1
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.js +10 -6
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.js.map +1 -1
- package/dist/service/aws/factory/sim-aws-account-service-cache.d.ts.map +1 -1
- package/dist/service/aws/factory/sim-aws-account-service-cache.js +2 -0
- package/dist/service/aws/factory/sim-aws-account-service-cache.js.map +1 -1
- package/dist/service/cloudformation/cdk/s3/bucket-notifications/configuration/sim-cdk-bucket-notification-configuration.d.ts +2 -0
- package/dist/service/cloudformation/cdk/s3/bucket-notifications/configuration/sim-cdk-bucket-notification-configuration.d.ts.map +1 -1
- package/dist/service/cloudformation/cdk/s3/bucket-notifications/configuration/sim-cdk-bucket-notification-configuration.js +15 -1
- package/dist/service/cloudformation/cdk/s3/bucket-notifications/configuration/sim-cdk-bucket-notification-configuration.js.map +1 -1
- package/dist/service/cloudformation/template/condition/sim-cfn-condition-comparison.d.ts +27 -0
- package/dist/service/cloudformation/template/condition/sim-cfn-condition-comparison.d.ts.map +1 -0
- package/dist/service/cloudformation/template/condition/sim-cfn-condition-comparison.js +44 -0
- package/dist/service/cloudformation/template/condition/sim-cfn-condition-comparison.js.map +1 -0
- package/dist/service/cloudformation/template/condition/sim-cfn-condition-evaluator.d.ts +36 -0
- package/dist/service/cloudformation/template/condition/sim-cfn-condition-evaluator.d.ts.map +1 -0
- package/dist/service/cloudformation/template/condition/sim-cfn-condition-evaluator.js +68 -0
- package/dist/service/cloudformation/template/condition/sim-cfn-condition-evaluator.js.map +1 -0
- package/dist/service/cloudformation/template/condition/sim-cfn-condition-expression.d.ts +45 -0
- package/dist/service/cloudformation/template/condition/sim-cfn-condition-expression.d.ts.map +1 -0
- package/dist/service/cloudformation/template/condition/sim-cfn-condition-expression.js +80 -0
- package/dist/service/cloudformation/template/condition/sim-cfn-condition-expression.js.map +1 -0
- package/dist/service/cloudformation/template/condition/sim-cfn-conditions.d.ts +28 -0
- package/dist/service/cloudformation/template/condition/sim-cfn-conditions.d.ts.map +1 -0
- package/dist/service/cloudformation/template/condition/sim-cfn-conditions.js +29 -0
- package/dist/service/cloudformation/template/condition/sim-cfn-conditions.js.map +1 -0
- package/dist/service/cloudformation/template/condition/sim-cfn-resource-conditions.d.ts +46 -0
- package/dist/service/cloudformation/template/condition/sim-cfn-resource-conditions.d.ts.map +1 -0
- package/dist/service/cloudformation/template/condition/sim-cfn-resource-conditions.js +94 -0
- package/dist/service/cloudformation/template/condition/sim-cfn-resource-conditions.js.map +1 -0
- package/dist/service/cloudformation/template/node/fn/find-in-map/sim-cfn-fn-find-in-map.d.ts +0 -1
- package/dist/service/cloudformation/template/node/fn/find-in-map/sim-cfn-fn-find-in-map.d.ts.map +1 -1
- package/dist/service/cloudformation/template/node/fn/find-in-map/sim-cfn-fn-find-in-map.js +2 -14
- package/dist/service/cloudformation/template/node/fn/find-in-map/sim-cfn-fn-find-in-map.js.map +1 -1
- package/dist/service/cloudformation/template/node/fn/if/sim-cfn-fn-if.d.ts +31 -0
- package/dist/service/cloudformation/template/node/fn/if/sim-cfn-fn-if.d.ts.map +1 -0
- package/dist/service/cloudformation/template/node/fn/if/sim-cfn-fn-if.js +52 -0
- package/dist/service/cloudformation/template/node/fn/if/sim-cfn-fn-if.js.map +1 -0
- package/dist/service/cloudformation/template/node/fn/select/sim-cfn-fn-select.d.ts +39 -0
- package/dist/service/cloudformation/template/node/fn/select/sim-cfn-fn-select.d.ts.map +1 -0
- package/dist/service/cloudformation/template/node/fn/select/sim-cfn-fn-select.js +82 -0
- package/dist/service/cloudformation/template/node/fn/select/sim-cfn-fn-select.js.map +1 -0
- package/dist/service/cloudformation/template/node/fn/split/sim-cfn-fn-split.d.ts +31 -0
- package/dist/service/cloudformation/template/node/fn/split/sim-cfn-fn-split.d.ts.map +1 -0
- package/dist/service/cloudformation/template/node/fn/split/sim-cfn-fn-split.js +45 -0
- package/dist/service/cloudformation/template/node/fn/split/sim-cfn-fn-split.js.map +1 -0
- package/dist/service/cloudformation/template/node/sim-cfn-list.d.ts +1 -1
- package/dist/service/cloudformation/template/node/sim-cfn-list.d.ts.map +1 -1
- package/dist/service/cloudformation/template/node/sim-cfn-list.js +3 -2
- package/dist/service/cloudformation/template/node/sim-cfn-list.js.map +1 -1
- package/dist/service/cloudformation/template/node/sim-cfn-object.d.ts.map +1 -1
- package/dist/service/cloudformation/template/node/sim-cfn-object.js +5 -1
- package/dist/service/cloudformation/template/node/sim-cfn-object.js.map +1 -1
- package/dist/service/cloudformation/template/parse/fn/if/sim-cfn-fn-if-parser.d.ts +19 -0
- package/dist/service/cloudformation/template/parse/fn/if/sim-cfn-fn-if-parser.d.ts.map +1 -0
- package/dist/service/cloudformation/template/parse/fn/if/sim-cfn-fn-if-parser.js +33 -0
- package/dist/service/cloudformation/template/parse/fn/if/sim-cfn-fn-if-parser.js.map +1 -0
- package/dist/service/cloudformation/template/parse/fn/select/sim-cfn-fn-select-parser.d.ts +26 -0
- package/dist/service/cloudformation/template/parse/fn/select/sim-cfn-fn-select-parser.d.ts.map +1 -0
- package/dist/service/cloudformation/template/parse/fn/select/sim-cfn-fn-select-parser.js +35 -0
- package/dist/service/cloudformation/template/parse/fn/select/sim-cfn-fn-select-parser.js.map +1 -0
- package/dist/service/cloudformation/template/parse/fn/sim-cfn-function-parser.d.ts +3 -0
- package/dist/service/cloudformation/template/parse/fn/sim-cfn-function-parser.d.ts.map +1 -1
- package/dist/service/cloudformation/template/parse/fn/sim-cfn-function-parser.js +18 -0
- package/dist/service/cloudformation/template/parse/fn/sim-cfn-function-parser.js.map +1 -1
- package/dist/service/cloudformation/template/parse/fn/split/sim-cfn-fn-split-parser.d.ts +25 -0
- package/dist/service/cloudformation/template/parse/fn/split/sim-cfn-fn-split-parser.d.ts.map +1 -0
- package/dist/service/cloudformation/template/parse/fn/split/sim-cfn-fn-split-parser.js +36 -0
- package/dist/service/cloudformation/template/parse/fn/split/sim-cfn-fn-split-parser.js.map +1 -0
- package/dist/service/cloudformation/template/resolve/sim-cfn-resolve-context.d.ts +14 -4
- package/dist/service/cloudformation/template/resolve/sim-cfn-resolve-context.d.ts.map +1 -1
- package/dist/service/cloudformation/template/resolve/sim-cfn-resolve-context.js +7 -5
- package/dist/service/cloudformation/template/resolve/sim-cfn-resolve-context.js.map +1 -1
- package/dist/service/cloudformation/template/sim-cfn-template-body-validator.d.ts.map +1 -1
- package/dist/service/cloudformation/template/sim-cfn-template-body-validator.js +4 -0
- package/dist/service/cloudformation/template/sim-cfn-template-body-validator.js.map +1 -1
- package/dist/service/cloudformation/template/sim-cfn-template.d.ts +14 -0
- package/dist/service/cloudformation/template/sim-cfn-template.d.ts.map +1 -1
- package/dist/service/cloudformation/template/sim-cfn-template.js +44 -12
- package/dist/service/cloudformation/template/sim-cfn-template.js.map +1 -1
- package/dist/service/cloudformation/template/value/sim-cfn-template-value-resolver.d.ts +20 -0
- package/dist/service/cloudformation/template/value/sim-cfn-template-value-resolver.d.ts.map +1 -1
- package/dist/service/cloudformation/template/value/sim-cfn-template-value-resolver.js +32 -2
- package/dist/service/cloudformation/template/value/sim-cfn-template-value-resolver.js.map +1 -1
- package/dist/service/cloudformation/template/value/sim-cfn-unresolved-expression.d.ts +11 -0
- package/dist/service/cloudformation/template/value/sim-cfn-unresolved-expression.d.ts.map +1 -0
- package/dist/service/cloudformation/template/value/sim-cfn-unresolved-expression.js +21 -0
- package/dist/service/cloudformation/template/value/sim-cfn-unresolved-expression.js.map +1 -0
- package/dist/service/cloudformation/template/value/sim-cfn-value-path.d.ts +22 -0
- package/dist/service/cloudformation/template/value/sim-cfn-value-path.d.ts.map +1 -0
- package/dist/service/cloudformation/template/value/sim-cfn-value-path.js +92 -0
- package/dist/service/cloudformation/template/value/sim-cfn-value-path.js.map +1 -0
- package/dist/service/cloudfront/command/create-distribution/create-distribution.command.d.ts +7 -0
- package/dist/service/cloudfront/command/create-distribution/create-distribution.command.d.ts.map +1 -1
- package/dist/service/cloudfront/command/create-distribution/create-distribution.handler.d.ts +2 -0
- package/dist/service/cloudfront/command/create-distribution/create-distribution.handler.d.ts.map +1 -1
- package/dist/service/cloudfront/command/create-distribution/create-distribution.handler.js +1 -1
- package/dist/service/cloudfront/command/create-distribution/create-distribution.handler.js.map +1 -1
- package/dist/service/cloudfront/distribution/configurator/sim-cloud-front-origin-configurator.d.ts +10 -1
- package/dist/service/cloudfront/distribution/configurator/sim-cloud-front-origin-configurator.d.ts.map +1 -1
- package/dist/service/cloudfront/distribution/configurator/sim-cloud-front-origin-configurator.js +21 -1
- package/dist/service/cloudfront/distribution/configurator/sim-cloud-front-origin-configurator.js.map +1 -1
- package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-dispatcher.d.ts +24 -0
- package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-dispatcher.d.ts.map +1 -0
- package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-dispatcher.factory.d.ts +7 -0
- package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-dispatcher.factory.d.ts.map +1 -0
- package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-dispatcher.factory.js +38 -0
- package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-dispatcher.factory.js.map +1 -0
- package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-dispatcher.js +2 -0
- package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-dispatcher.js.map +1 -0
- package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-request.d.ts +17 -0
- package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-request.d.ts.map +1 -0
- package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-request.js +37 -0
- package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-request.js.map +1 -0
- package/dist/service/cloudfront/origin/custom/sim-cloudfront-custom-origin.d.ts +38 -0
- package/dist/service/cloudfront/origin/custom/sim-cloudfront-custom-origin.d.ts.map +1 -0
- package/dist/service/cloudfront/origin/custom/sim-cloudfront-custom-origin.js +45 -0
- package/dist/service/cloudfront/origin/custom/sim-cloudfront-custom-origin.js.map +1 -0
- package/dist/service/cloudfront/sim-cloudfront.d.ts +3 -0
- package/dist/service/cloudfront/sim-cloudfront.d.ts.map +1 -1
- package/dist/service/cloudfront/sim-cloudfront.js +4 -1
- package/dist/service/cloudfront/sim-cloudfront.js.map +1 -1
- package/dist/service/dynamodb/command/sim-dynamodb-command-handlers.d.ts +4 -0
- package/dist/service/dynamodb/command/sim-dynamodb-command-handlers.d.ts.map +1 -1
- package/dist/service/dynamodb/command/sim-dynamodb-command-handlers.js +2 -0
- package/dist/service/dynamodb/command/sim-dynamodb-command-handlers.js.map +1 -1
- package/dist/service/dynamodb/command/table/sim-dynamodb-create-table.d.ts +6 -0
- package/dist/service/dynamodb/command/table/sim-dynamodb-create-table.d.ts.map +1 -1
- package/dist/service/dynamodb/command/table/sim-dynamodb-create-table.js +11 -0
- package/dist/service/dynamodb/command/table/sim-dynamodb-create-table.js.map +1 -1
- package/dist/service/dynamodb/command/table/sim-dynamodb-unsimulated-table-input.d.ts +6 -5
- package/dist/service/dynamodb/command/table/sim-dynamodb-unsimulated-table-input.d.ts.map +1 -1
- package/dist/service/dynamodb/command/table/sim-dynamodb-unsimulated-table-input.js +6 -16
- package/dist/service/dynamodb/command/table/sim-dynamodb-unsimulated-table-input.js.map +1 -1
- package/dist/service/dynamodb/command/table/sim-dynamodb-unsimulated-update-input.d.ts +4 -4
- package/dist/service/dynamodb/command/table/sim-dynamodb-unsimulated-update-input.d.ts.map +1 -1
- package/dist/service/dynamodb/command/table/sim-dynamodb-unsimulated-update-input.js +4 -9
- package/dist/service/dynamodb/command/table/sim-dynamodb-unsimulated-update-input.js.map +1 -1
- package/dist/service/dynamodb/command/table/table.command.d.ts +2 -1
- package/dist/service/dynamodb/command/table/table.command.d.ts.map +1 -1
- package/dist/service/dynamodb/command/table/table.types.d.ts +4 -7
- package/dist/service/dynamodb/command/table/table.types.d.ts.map +1 -1
- package/dist/service/dynamodb/sim-dynamodb.d.ts +42 -60
- package/dist/service/dynamodb/sim-dynamodb.d.ts.map +1 -1
- package/dist/service/dynamodb/sim-dynamodb.js +48 -60
- package/dist/service/dynamodb/sim-dynamodb.js.map +1 -1
- package/dist/service/dynamodb/stream/sim-dynamodb-item-change.d.ts +34 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-item-change.d.ts.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-item-change.js +2 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-item-change.js.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-activity.d.ts +42 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-activity.d.ts.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-activity.js +35 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-activity.js.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-arn.d.ts +22 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-arn.d.ts.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-arn.js +30 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-arn.js.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-images.d.ts +22 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-images.d.ts.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-images.js +27 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-images.js.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-record-keys.d.ts +15 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-record-keys.d.ts.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-record-keys.js +25 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-record-keys.js.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-record-size.d.ts +11 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-record-size.d.ts.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-record-size.js +74 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-record-size.js.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-record.d.ts +49 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-record.d.ts.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-record.js +60 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-record.js.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-sequence-numbers.d.ts +18 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-sequence-numbers.d.ts.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-sequence-numbers.js +31 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-sequence-numbers.js.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-shard.d.ts +39 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-shard.d.ts.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-shard.js +64 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-shard.js.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-specification.d.ts +28 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-specification.d.ts.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-specification.js +30 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-specification.js.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-store.d.ts +26 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-store.d.ts.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-store.js +29 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-store.js.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-update.d.ts +13 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-update.d.ts.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-update.js +48 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-update.js.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-view-type.d.ts +10 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-view-type.d.ts.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-view-type.js +38 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream-view-type.js.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream.d.ts +74 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream.d.ts.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream.js +82 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream.js.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream.types.d.ts +24 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream.types.d.ts.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream.types.js +2 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-stream.types.js.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-streamed-table.factory.d.ts +31 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-streamed-table.factory.d.ts.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-streamed-table.factory.js +45 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-streamed-table.factory.js.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-table-stream.d.ts +97 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-table-stream.d.ts.map +1 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-table-stream.js +135 -0
- package/dist/service/dynamodb/stream/sim-dynamodb-table-stream.js.map +1 -0
- package/dist/service/dynamodb/table/sim-dynamodb-table-description.d.ts.map +1 -1
- package/dist/service/dynamodb/table/sim-dynamodb-table-description.js +6 -0
- package/dist/service/dynamodb/table/sim-dynamodb-table-description.js.map +1 -1
- package/dist/service/dynamodb/table/sim-dynamodb-table-items.d.ts +33 -1
- package/dist/service/dynamodb/table/sim-dynamodb-table-items.d.ts.map +1 -1
- package/dist/service/dynamodb/table/sim-dynamodb-table-items.js +46 -1
- package/dist/service/dynamodb/table/sim-dynamodb-table-items.js.map +1 -1
- package/dist/service/dynamodb/table/sim-dynamodb-table-storage.d.ts +95 -0
- package/dist/service/dynamodb/table/sim-dynamodb-table-storage.d.ts.map +1 -0
- package/dist/service/dynamodb/table/sim-dynamodb-table-storage.js +120 -0
- package/dist/service/dynamodb/table/sim-dynamodb-table-storage.js.map +1 -0
- package/dist/service/dynamodb/table/sim-dynamodb-table-update.d.ts +2 -0
- package/dist/service/dynamodb/table/sim-dynamodb-table-update.d.ts.map +1 -1
- package/dist/service/dynamodb/table/sim-dynamodb-table-update.js +11 -6
- package/dist/service/dynamodb/table/sim-dynamodb-table-update.js.map +1 -1
- package/dist/service/dynamodb/table/sim-dynamodb-table.d.ts +33 -70
- package/dist/service/dynamodb/table/sim-dynamodb-table.d.ts.map +1 -1
- package/dist/service/dynamodb/table/sim-dynamodb-table.js +50 -93
- package/dist/service/dynamodb/table/sim-dynamodb-table.js.map +1 -1
- package/dist/service/dynamodb/table/sim-dynamodb-updatable-table.d.ts +6 -3
- package/dist/service/dynamodb/table/sim-dynamodb-updatable-table.d.ts.map +1 -1
- package/dist/service/dynamodb/time-to-live/sim-dynamodb-table-time-to-live.d.ts.map +1 -1
- package/dist/service/dynamodb/time-to-live/sim-dynamodb-table-time-to-live.js +5 -1
- package/dist/service/dynamodb/time-to-live/sim-dynamodb-table-time-to-live.js.map +1 -1
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.d.ts +5 -2
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.d.ts.map +1 -1
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.js +13 -8
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.js.map +1 -1
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-refusals.d.ts +4 -0
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-refusals.d.ts.map +1 -1
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-refusals.js +32 -21
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-refusals.js.map +1 -1
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-values.d.ts +1 -6
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-values.d.ts.map +1 -1
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-values.js +1 -22
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-values.js.map +1 -1
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.d.ts +2 -1
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.d.ts.map +1 -1
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.js +3 -2
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.js.map +1 -1
- package/dist/service/lambda/event-source/poll/sim-lambda-batch-item-failures.d.ts +17 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-batch-item-failures.d.ts.map +1 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-batch-item-failures.js +46 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-batch-item-failures.js.map +1 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-event-source-batch-response.d.ts +39 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-event-source-batch-response.d.ts.map +1 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-event-source-batch-response.js +28 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-event-source-batch-response.js.map +1 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-event-source-delivery.d.ts +33 -7
- package/dist/service/lambda/event-source/poll/sim-lambda-event-source-delivery.d.ts.map +1 -1
- package/dist/service/lambda/event-source/poll/sim-lambda-event-source-delivery.js +7 -6
- package/dist/service/lambda/event-source/poll/sim-lambda-event-source-delivery.js.map +1 -1
- package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poller-factory.d.ts +25 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poller-factory.d.ts.map +1 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poller-factory.js +16 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poller-factory.js.map +1 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poller.d.ts +9 -69
- package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poller.d.ts.map +1 -1
- package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poller.js +1 -135
- package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poller.js.map +1 -1
- package/dist/service/lambda/event-source/poll/sim-lambda-sqs-batch-response.d.ts +6 -30
- package/dist/service/lambda/event-source/poll/sim-lambda-sqs-batch-response.d.ts.map +1 -1
- package/dist/service/lambda/event-source/poll/sim-lambda-sqs-batch-response.js +9 -66
- package/dist/service/lambda/event-source/poll/sim-lambda-sqs-batch-response.js.map +1 -1
- package/dist/service/lambda/event-source/poll/sim-lambda-sqs-delivery.d.ts +17 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-sqs-delivery.d.ts.map +1 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-sqs-delivery.js +17 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-sqs-delivery.js.map +1 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-sqs-event-source-poller.d.ts +88 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-sqs-event-source-poller.d.ts.map +1 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-sqs-event-source-poller.js +132 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-sqs-event-source-poller.js.map +1 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-sqs-polled-queue.d.ts +41 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-sqs-polled-queue.d.ts.map +1 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-sqs-polled-queue.js +60 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-sqs-polled-queue.js.map +1 -0
- package/dist/service/lambda/event-source/queue/sim-lambda-sqs-event-source-arn.d.ts +23 -5
- package/dist/service/lambda/event-source/queue/sim-lambda-sqs-event-source-arn.d.ts.map +1 -1
- package/dist/service/lambda/event-source/queue/sim-lambda-sqs-event-source-arn.js +65 -12
- package/dist/service/lambda/event-source/queue/sim-lambda-sqs-event-source-arn.js.map +1 -1
- package/dist/service/lambda/event-source/sim-lambda-event-source-arn.d.ts +23 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-arn.d.ts.map +1 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-arn.js +30 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-arn.js.map +1 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-batch-rules.d.ts +26 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-batch-rules.d.ts.map +1 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-batch-rules.js +35 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-batch-rules.js.map +1 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.d.ts +6 -8
- package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.d.ts.map +1 -1
- package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.js +6 -9
- package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.js.map +1 -1
- package/dist/service/lambda/event-source/sim-lambda-event-source-pollers.d.ts +5 -5
- package/dist/service/lambda/event-source/sim-lambda-event-source-pollers.d.ts.map +1 -1
- package/dist/service/lambda/event-source/sim-lambda-event-source-pollers.js +5 -5
- package/dist/service/lambda/event-source/sim-lambda-event-source-pollers.js.map +1 -1
- package/dist/service/lambda/event-source/sim-lambda-event-source-polling-permission.d.ts +18 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-polling-permission.d.ts.map +1 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-polling-permission.js +23 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-polling-permission.js.map +1 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-role-permissions.d.ts +7 -3
- package/dist/service/lambda/event-source/sim-lambda-event-source-role-permissions.d.ts.map +1 -1
- package/dist/service/lambda/event-source/sim-lambda-event-source-role-permissions.js +13 -21
- package/dist/service/lambda/event-source/sim-lambda-event-source-role-permissions.js.map +1 -1
- package/dist/service/s3/bucket/notification/sim-s3-lambda-notification.d.ts +7 -25
- package/dist/service/s3/bucket/notification/sim-s3-lambda-notification.d.ts.map +1 -1
- package/dist/service/s3/bucket/notification/sim-s3-lambda-notification.js +10 -31
- package/dist/service/s3/bucket/notification/sim-s3-lambda-notification.js.map +1 -1
- package/dist/service/s3/bucket/notification/sim-s3-notification-configuration-reader.d.ts +6 -10
- package/dist/service/s3/bucket/notification/sim-s3-notification-configuration-reader.d.ts.map +1 -1
- package/dist/service/s3/bucket/notification/sim-s3-notification-configuration-reader.js +16 -68
- package/dist/service/s3/bucket/notification/sim-s3-notification-configuration-reader.js.map +1 -1
- package/dist/service/s3/bucket/notification/sim-s3-notification-configuration.d.ts +17 -4
- package/dist/service/s3/bucket/notification/sim-s3-notification-configuration.d.ts.map +1 -1
- package/dist/service/s3/bucket/notification/sim-s3-notification-configuration.js +19 -10
- package/dist/service/s3/bucket/notification/sim-s3-notification-configuration.js.map +1 -1
- package/dist/service/s3/bucket/notification/sim-s3-notification-ids.d.ts +9 -0
- package/dist/service/s3/bucket/notification/sim-s3-notification-ids.d.ts.map +1 -0
- package/dist/service/s3/bucket/notification/sim-s3-notification-ids.js +18 -0
- package/dist/service/s3/bucket/notification/sim-s3-notification-ids.js.map +1 -0
- package/dist/service/s3/bucket/notification/sim-s3-notification-overlap.d.ts +5 -3
- package/dist/service/s3/bucket/notification/sim-s3-notification-overlap.d.ts.map +1 -1
- package/dist/service/s3/bucket/notification/sim-s3-notification-overlap.js +3 -1
- package/dist/service/s3/bucket/notification/sim-s3-notification-overlap.js.map +1 -1
- package/dist/service/s3/bucket/notification/sim-s3-notification-properties.d.ts +19 -0
- package/dist/service/s3/bucket/notification/sim-s3-notification-properties.d.ts.map +1 -0
- package/dist/service/s3/bucket/notification/sim-s3-notification-properties.js +27 -0
- package/dist/service/s3/bucket/notification/sim-s3-notification-properties.js.map +1 -0
- package/dist/service/s3/bucket/notification/sim-s3-notification.d.ts +61 -0
- package/dist/service/s3/bucket/notification/sim-s3-notification.d.ts.map +1 -0
- package/dist/service/s3/bucket/notification/sim-s3-notification.js +50 -0
- package/dist/service/s3/bucket/notification/sim-s3-notification.js.map +1 -0
- package/dist/service/s3/bucket/notification/sim-s3-queue-notification.d.ts +21 -0
- package/dist/service/s3/bucket/notification/sim-s3-queue-notification.d.ts.map +1 -0
- package/dist/service/s3/bucket/notification/sim-s3-queue-notification.js +24 -0
- package/dist/service/s3/bucket/notification/sim-s3-queue-notification.js.map +1 -0
- package/dist/service/s3/bucket/notification/sim-s3-unsimulated-notification-destinations.d.ts +10 -0
- package/dist/service/s3/bucket/notification/sim-s3-unsimulated-notification-destinations.d.ts.map +1 -0
- package/dist/service/s3/bucket/notification/sim-s3-unsimulated-notification-destinations.js +31 -0
- package/dist/service/s3/bucket/notification/sim-s3-unsimulated-notification-destinations.js.map +1 -0
- package/dist/service/s3/cfn/bucket/notification/sim-cfn-s3-bucket-notification-configuration.d.ts +3 -0
- package/dist/service/s3/cfn/bucket/notification/sim-cfn-s3-bucket-notification-configuration.d.ts.map +1 -1
- package/dist/service/s3/cfn/bucket/notification/sim-cfn-s3-bucket-notification-configuration.js +30 -1
- package/dist/service/s3/cfn/bucket/notification/sim-cfn-s3-bucket-notification-configuration.js.map +1 -1
- package/dist/service/s3/command/get-bucket-notification-configuration/get-bucket-notification-configuration.command.d.ts +2 -1
- package/dist/service/s3/command/get-bucket-notification-configuration/get-bucket-notification-configuration.command.d.ts.map +1 -1
- package/dist/service/s3/command/put-bucket-notification-configuration/put-bucket-notification-configuration.command.d.ts +10 -1
- package/dist/service/s3/command/put-bucket-notification-configuration/put-bucket-notification-configuration.command.d.ts.map +1 -1
- package/dist/service/s3/notification/destination/lambda/sim-aws-s3-notification-functions.d.ts +0 -4
- package/dist/service/s3/notification/destination/lambda/sim-aws-s3-notification-functions.d.ts.map +1 -1
- package/dist/service/s3/notification/destination/lambda/sim-aws-s3-notification-functions.js +1 -4
- package/dist/service/s3/notification/destination/lambda/sim-aws-s3-notification-functions.js.map +1 -1
- package/dist/service/s3/notification/destination/sim-s3-notification-destination-check.d.ts.map +1 -1
- package/dist/service/s3/notification/destination/sim-s3-notification-destination-check.js +6 -4
- package/dist/service/s3/notification/destination/sim-s3-notification-destination-check.js.map +1 -1
- package/dist/service/s3/notification/destination/sim-s3-notification-destination.d.ts +20 -2
- package/dist/service/s3/notification/destination/sim-s3-notification-destination.d.ts.map +1 -1
- package/dist/service/s3/notification/destination/sim-s3-service-notification-destinations.d.ts +12 -10
- package/dist/service/s3/notification/destination/sim-s3-service-notification-destinations.d.ts.map +1 -1
- package/dist/service/s3/notification/destination/sim-s3-service-notification-destinations.js +19 -17
- package/dist/service/s3/notification/destination/sim-s3-service-notification-destinations.js.map +1 -1
- package/dist/service/s3/notification/destination/sim-s3-service-principal.d.ts +8 -0
- package/dist/service/s3/notification/destination/sim-s3-service-principal.d.ts.map +1 -0
- package/dist/service/s3/notification/destination/sim-s3-service-principal.js +8 -0
- package/dist/service/s3/notification/destination/sim-s3-service-principal.js.map +1 -0
- package/dist/service/s3/notification/destination/sqs/sim-aws-s3-notification-queues.d.ts +40 -0
- package/dist/service/s3/notification/destination/sqs/sim-aws-s3-notification-queues.d.ts.map +1 -0
- package/dist/service/s3/notification/destination/sqs/sim-aws-s3-notification-queues.js +52 -0
- package/dist/service/s3/notification/destination/sqs/sim-aws-s3-notification-queues.js.map +1 -0
- package/dist/service/s3/notification/destination/sqs/sim-s3-notification-queue-arn.d.ts +33 -0
- package/dist/service/s3/notification/destination/sqs/sim-s3-notification-queue-arn.d.ts.map +1 -0
- package/dist/service/s3/notification/destination/sqs/sim-s3-notification-queue-arn.js +64 -0
- package/dist/service/s3/notification/destination/sqs/sim-s3-notification-queue-arn.js.map +1 -0
- package/dist/service/s3/notification/destination/sqs/sim-s3-notification-queue.d.ts +33 -0
- package/dist/service/s3/notification/destination/sqs/sim-s3-notification-queue.d.ts.map +1 -0
- package/dist/service/s3/notification/destination/sqs/sim-s3-notification-queue.js +55 -0
- package/dist/service/s3/notification/destination/sqs/sim-s3-notification-queue.js.map +1 -0
- package/dist/service/s3/notification/destination/sqs/sim-s3-notification-queues.d.ts +23 -0
- package/dist/service/s3/notification/destination/sqs/sim-s3-notification-queues.d.ts.map +1 -0
- package/dist/service/s3/notification/destination/sqs/sim-s3-notification-queues.js +2 -0
- package/dist/service/s3/notification/destination/sqs/sim-s3-notification-queues.js.map +1 -0
- package/dist/service/s3/notification/destination/sqs/sim-s3-sqs-notification-destination.d.ts +40 -0
- package/dist/service/s3/notification/destination/sqs/sim-s3-sqs-notification-destination.d.ts.map +1 -0
- package/dist/service/s3/notification/destination/sqs/sim-s3-sqs-notification-destination.js +51 -0
- package/dist/service/s3/notification/destination/sqs/sim-s3-sqs-notification-destination.js.map +1 -0
- package/dist/service/s3/notification/sim-s3-notification-dispatcher.d.ts +2 -2
- package/dist/service/s3/notification/sim-s3-notification-dispatcher.d.ts.map +1 -1
- package/dist/service/s3/notification/sim-s3-notification-dispatcher.js +6 -3
- package/dist/service/s3/notification/sim-s3-notification-dispatcher.js.map +1 -1
- package/dist/service/sqs/command/authorize/sim-sqs-condition-context.d.ts.map +1 -1
- package/dist/service/sqs/command/authorize/sim-sqs-condition-context.js +9 -5
- package/dist/service/sqs/command/authorize/sim-sqs-condition-context.js.map +1 -1
- package/dist/service/sqs/command/authorize/sim-sqs-service-send-authorizer.d.ts +40 -0
- package/dist/service/sqs/command/authorize/sim-sqs-service-send-authorizer.d.ts.map +1 -0
- package/dist/service/sqs/command/authorize/sim-sqs-service-send-authorizer.js +40 -0
- package/dist/service/sqs/command/authorize/sim-sqs-service-send-authorizer.js.map +1 -0
- package/dist/service/sqs/command/sim-sqs-request-options.d.ts +16 -0
- package/dist/service/sqs/command/sim-sqs-request-options.d.ts.map +1 -1
- package/dist/service/sqs/command/sim-sqs-request-options.js +9 -0
- package/dist/service/sqs/command/sim-sqs-request-options.js.map +1 -1
- package/dist/service/sqs/index.d.ts +2 -2
- package/dist/service/sqs/index.d.ts.map +1 -1
- package/dist/service/sqs/index.js +2 -2
- package/dist/service/sqs/index.js.map +1 -1
- package/dist/service/sqs/queue/sim-sqs-queue-arn.d.ts +17 -2
- package/dist/service/sqs/queue/sim-sqs-queue-arn.d.ts.map +1 -1
- package/dist/service/sqs/queue/sim-sqs-queue-arn.js +9 -5
- package/dist/service/sqs/queue/sim-sqs-queue-arn.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { SimCfnResourceTemplateRecord } from "../sim-cfn-template.js";
|
|
2
|
+
import type { SimCfnTemplateValue } from "../value/sim-cfn-template-value.js";
|
|
3
|
+
import type { SimCfnConditions } from "./sim-cfn-conditions.js";
|
|
4
|
+
interface SimCfnResourceConditionsProperties {
|
|
5
|
+
readonly resources: Record<string, SimCfnTemplateValue>;
|
|
6
|
+
readonly conditions: SimCfnConditions;
|
|
7
|
+
readonly stackName?: string | undefined;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Applies the Resource-level `Condition` attribute to a template's Resources.
|
|
11
|
+
*
|
|
12
|
+
* A Resource whose Condition is false is not created at all, so it never
|
|
13
|
+
* reaches the Stack Resource map. That is deliberately not the skipped-Resource
|
|
14
|
+
* path used for a Resource type this simulation cannot create: a skipped
|
|
15
|
+
* Resource is still in the Stack and still answers `Ref` and `Fn::GetAtt` with
|
|
16
|
+
* stand-in values, where a Resource the template conditioned out does not
|
|
17
|
+
* exist, and naming it is a template mistake CloudFormation refuses.
|
|
18
|
+
*/
|
|
19
|
+
export declare class SimCfnResourceConditions {
|
|
20
|
+
private readonly stackName;
|
|
21
|
+
private readonly conditionedOut;
|
|
22
|
+
constructor(properties: SimCfnResourceConditionsProperties);
|
|
23
|
+
/**
|
|
24
|
+
* Whether the template asked for this Resource but its Condition is false.
|
|
25
|
+
*/
|
|
26
|
+
excludes(logicalId: string): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Refuse a template where a Resource that is created names one that is not.
|
|
29
|
+
*
|
|
30
|
+
* Both the intrinsic expressions and `DependsOn` count. A `DependsOn` on a
|
|
31
|
+
* Resource the Stack never creates would otherwise leave the deployment
|
|
32
|
+
* waiting on it and fail as an unresolvable dependency, which says nothing
|
|
33
|
+
* about the Condition that caused it.
|
|
34
|
+
*
|
|
35
|
+
* The templates given here are already resolved, so an `Fn::If` has picked
|
|
36
|
+
* its branch: a name only the branch that was not taken carries never gets
|
|
37
|
+
* this far.
|
|
38
|
+
*/
|
|
39
|
+
assertNotReferenced(resourceTemplates: readonly SimCfnResourceTemplateRecord[]): void;
|
|
40
|
+
private assertNamesOnlyCreated;
|
|
41
|
+
private readConditionedOut;
|
|
42
|
+
private conditionName;
|
|
43
|
+
private error;
|
|
44
|
+
}
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=sim-cfn-resource-conditions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cfn-resource-conditions.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudformation/template/condition/sim-cfn-resource-conditions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,UAAU,kCAAkC;IAC1C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IACxD,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAC;IACtC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACzC;AAED;;;;;;;;;GASG;AACH,qBAAa,wBAAwB;IACnC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAqB;IAC/C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA8B;IAE7D,YAAY,UAAU,EAAE,kCAAkC,EAMzD;IAED;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAEnC;IAED;;;;;;;;;;;OAWG;IACH,mBAAmB,CACjB,iBAAiB,EAAE,SAAS,4BAA4B,EAAE,GACzD,IAAI,CAcN;IAED,OAAO,CAAC,sBAAsB;IAiB9B,OAAO,CAAC,kBAAkB;IA4B1B,OAAO,CAAC,aAAa;IAqBrB,OAAO,CAAC,KAAK;CAKd"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { parseSimCfnResourceDependencies } from "../../resource/dependency/sim-cfn-resource-dependencies.js";
|
|
2
|
+
import { isCfnTemplateValueRecord } from "../../resource/template/sim-cfn-templ-value-record.js";
|
|
3
|
+
import { parseSimCfnNode } from "../parse/node/sim-cfn-node-parser.js";
|
|
4
|
+
/**
|
|
5
|
+
* Applies the Resource-level `Condition` attribute to a template's Resources.
|
|
6
|
+
*
|
|
7
|
+
* A Resource whose Condition is false is not created at all, so it never
|
|
8
|
+
* reaches the Stack Resource map. That is deliberately not the skipped-Resource
|
|
9
|
+
* path used for a Resource type this simulation cannot create: a skipped
|
|
10
|
+
* Resource is still in the Stack and still answers `Ref` and `Fn::GetAtt` with
|
|
11
|
+
* stand-in values, where a Resource the template conditioned out does not
|
|
12
|
+
* exist, and naming it is a template mistake CloudFormation refuses.
|
|
13
|
+
*/
|
|
14
|
+
export class SimCfnResourceConditions {
|
|
15
|
+
stackName;
|
|
16
|
+
conditionedOut;
|
|
17
|
+
constructor(properties) {
|
|
18
|
+
this.stackName = properties.stackName;
|
|
19
|
+
this.conditionedOut = this.readConditionedOut(properties.resources, properties.conditions);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Whether the template asked for this Resource but its Condition is false.
|
|
23
|
+
*/
|
|
24
|
+
excludes(logicalId) {
|
|
25
|
+
return this.conditionedOut.has(logicalId);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Refuse a template where a Resource that is created names one that is not.
|
|
29
|
+
*
|
|
30
|
+
* Both the intrinsic expressions and `DependsOn` count. A `DependsOn` on a
|
|
31
|
+
* Resource the Stack never creates would otherwise leave the deployment
|
|
32
|
+
* waiting on it and fail as an unresolvable dependency, which says nothing
|
|
33
|
+
* about the Condition that caused it.
|
|
34
|
+
*
|
|
35
|
+
* The templates given here are already resolved, so an `Fn::If` has picked
|
|
36
|
+
* its branch: a name only the branch that was not taken carries never gets
|
|
37
|
+
* this far.
|
|
38
|
+
*/
|
|
39
|
+
assertNotReferenced(resourceTemplates) {
|
|
40
|
+
if (this.conditionedOut.size === 0) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
for (const { logicalId, template } of resourceTemplates) {
|
|
44
|
+
this.assertNamesOnlyCreated(logicalId, new Set([
|
|
45
|
+
...parseSimCfnNode(template).referencedNames(),
|
|
46
|
+
...parseSimCfnResourceDependencies(template["DependsOn"]),
|
|
47
|
+
]));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
assertNamesOnlyCreated(logicalId, referenced) {
|
|
51
|
+
for (const [excludedId, conditionName] of this.conditionedOut) {
|
|
52
|
+
if (!referenced.has(excludedId)) {
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
throw this.error(`Resource ${logicalId} names Resource ${excludedId}, which the ` +
|
|
56
|
+
`Stack does not create because its Condition ${conditionName} ` +
|
|
57
|
+
"is false");
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
readConditionedOut(resources, conditions) {
|
|
61
|
+
const conditionedOut = new Map();
|
|
62
|
+
for (const [logicalId, resourceTemplate] of Object.entries(resources)) {
|
|
63
|
+
const conditionName = this.conditionName(logicalId, resourceTemplate);
|
|
64
|
+
if (conditionName === undefined) {
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
if (!conditions.has(conditionName)) {
|
|
68
|
+
throw this.error(`Resource ${logicalId} names Condition ${conditionName}, which the ` +
|
|
69
|
+
"template does not define");
|
|
70
|
+
}
|
|
71
|
+
if (!conditions.value(conditionName)) {
|
|
72
|
+
conditionedOut.set(logicalId, conditionName);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return conditionedOut;
|
|
76
|
+
}
|
|
77
|
+
conditionName(logicalId, resourceTemplate) {
|
|
78
|
+
if (!isCfnTemplateValueRecord(resourceTemplate)) {
|
|
79
|
+
return undefined;
|
|
80
|
+
}
|
|
81
|
+
const conditionName = resourceTemplate["Condition"];
|
|
82
|
+
if (conditionName === undefined) {
|
|
83
|
+
return undefined;
|
|
84
|
+
}
|
|
85
|
+
if (typeof conditionName !== "string") {
|
|
86
|
+
throw this.error(`Resource ${logicalId} Condition must be a string`);
|
|
87
|
+
}
|
|
88
|
+
return conditionName;
|
|
89
|
+
}
|
|
90
|
+
error(detail) {
|
|
91
|
+
return new Error(`Sim CloudFormation Stack ${this.stackName ?? "unknown"} ${detail}`);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=sim-cfn-resource-conditions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cfn-resource-conditions.js","sourceRoot":"","sources":["../../../../../src/service/cloudformation/template/condition/sim-cfn-resource-conditions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,4DAA4D,CAAC;AAC7G,OAAO,EAAE,wBAAwB,EAAE,MAAM,uDAAuD,CAAC;AACjG,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAWvE;;;;;;;;;GASG;AACH,MAAM,OAAO,wBAAwB;IAClB,SAAS,CAAqB;IAC9B,cAAc,CAA8B;IAE7D,YAAY,UAA8C;QACxD,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC;QACtC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,kBAAkB,CAC3C,UAAU,CAAC,SAAS,EACpB,UAAU,CAAC,UAAU,CACtB,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,SAAiB;QACxB,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC5C,CAAC;IAED;;;;;;;;;;;OAWG;IACH,mBAAmB,CACjB,iBAA0D;QAE1D,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;YACnC,OAAO;QACT,CAAC;QAED,KAAK,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,iBAAiB,EAAE,CAAC;YACxD,IAAI,CAAC,sBAAsB,CACzB,SAAS,EACT,IAAI,GAAG,CAAC;gBACN,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC,eAAe,EAAE;gBAC9C,GAAG,+BAA+B,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;aAC1D,CAAC,CACH,CAAC;QACJ,CAAC;IACH,CAAC;IAEO,sBAAsB,CAC5B,SAAiB,EACjB,UAA+B;QAE/B,KAAK,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;YAC9D,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;gBAChC,SAAS;YACX,CAAC;YAED,MAAM,IAAI,CAAC,KAAK,CACd,YAAY,SAAS,mBAAmB,UAAU,cAAc;gBAC9D,+CAA+C,aAAa,GAAG;gBAC/D,UAAU,CACb,CAAC;QACJ,CAAC;IACH,CAAC;IAEO,kBAAkB,CACxB,SAA8C,EAC9C,UAA4B;QAE5B,MAAM,cAAc,GAAG,IAAI,GAAG,EAAkB,CAAC;QAEjD,KAAK,MAAM,CAAC,SAAS,EAAE,gBAAgB,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;YACtE,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;YAEtE,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;gBAChC,SAAS;YACX,CAAC;YAED,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;gBACnC,MAAM,IAAI,CAAC,KAAK,CACd,YAAY,SAAS,oBAAoB,aAAa,cAAc;oBAClE,0BAA0B,CAC7B,CAAC;YACJ,CAAC;YAED,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE,CAAC;gBACrC,cAAc,CAAC,GAAG,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;YAC/C,CAAC;QACH,CAAC;QAED,OAAO,cAAc,CAAC;IACxB,CAAC;IAEO,aAAa,CACnB,SAAiB,EACjB,gBAAqC;QAErC,IAAI,CAAC,wBAAwB,CAAC,gBAAgB,CAAC,EAAE,CAAC;YAChD,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,MAAM,aAAa,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAAC;QAEpD,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;YAChC,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE,CAAC;YACtC,MAAM,IAAI,CAAC,KAAK,CAAC,YAAY,SAAS,6BAA6B,CAAC,CAAC;QACvE,CAAC;QAED,OAAO,aAAa,CAAC;IACvB,CAAC;IAEO,KAAK,CAAC,MAAc;QAC1B,OAAO,IAAI,KAAK,CACd,4BAA4B,IAAI,CAAC,SAAS,IAAI,SAAS,IAAI,MAAM,EAAE,CACpE,CAAC;IACJ,CAAC;CACF"}
|
package/dist/service/cloudformation/template/node/fn/find-in-map/sim-cfn-fn-find-in-map.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-cfn-fn-find-in-map.d.ts","sourceRoot":"","sources":["../../../../../../../src/service/cloudformation/template/node/fn/find-in-map/sim-cfn-fn-find-in-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACxF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"sim-cfn-fn-find-in-map.d.ts","sourceRoot":"","sources":["../../../../../../../src/service/cloudformation/template/node/fn/find-in-map/sim-cfn-fn-find-in-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACxF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAKpF;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,UAAU;IAE7C,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,cAAc;IAHjC,YACmB,OAAO,EAAE,UAAU,EACnB,WAAW,EAAE,UAAU,EACvB,cAAc,EAAE,UAAU,EAG5C;IAED;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,oBAAoB,GAAG,mBAAmB,CAiC1D;IAED;;OAEG;IACM,eAAe,IAAI,MAAM,EAAE,CAOnC;IAED,OAAO,CAAC,UAAU;IAoBlB,OAAO,CAAC,aAAa;CAGtB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SimCfnNode } from "../../sim-cfn-node.js";
|
|
2
2
|
import { isRecord } from "../../../../../../util/type-guard/record.js";
|
|
3
3
|
import { assertDefined } from "../../../../../../util/type-guard/defined.js";
|
|
4
|
+
import { isSimCfnUnresolvedExpression } from "../../../value/sim-cfn-unresolved-expression.js";
|
|
4
5
|
/**
|
|
5
6
|
* Simulated CloudFormation `Fn::FindInMap` intrinsic function.
|
|
6
7
|
*/
|
|
@@ -55,25 +56,12 @@ export class SimCfnFnFindInMap extends SimCfnNode {
|
|
|
55
56
|
if (typeof value === "string") {
|
|
56
57
|
return value;
|
|
57
58
|
}
|
|
58
|
-
if (
|
|
59
|
+
if (isSimCfnUnresolvedExpression(value)) {
|
|
59
60
|
return value;
|
|
60
61
|
}
|
|
61
62
|
/* v8 ignore next -- defensive */
|
|
62
63
|
throw new TypeError(`Sim CloudFormation Fn::FindInMap keys must each resolve to a string, got ${typeof value}`);
|
|
63
64
|
}
|
|
64
|
-
isUnresolvedIntrinsicExpression(value) {
|
|
65
|
-
/* v8 ignore if */
|
|
66
|
-
if (!isRecord(value) || Array.isArray(value)) {
|
|
67
|
-
return false;
|
|
68
|
-
}
|
|
69
|
-
const entries = Object.entries(value);
|
|
70
|
-
/* v8 ignore if */
|
|
71
|
-
if (entries.length !== 1) {
|
|
72
|
-
return false;
|
|
73
|
-
}
|
|
74
|
-
const functionName = entries[0]?.[0];
|
|
75
|
-
return functionName === "Ref" || functionName?.startsWith("Fn::") === true;
|
|
76
|
-
}
|
|
77
65
|
isResolvedKey(value) {
|
|
78
66
|
return typeof value === "string";
|
|
79
67
|
}
|
package/dist/service/cloudformation/template/node/fn/find-in-map/sim-cfn-fn-find-in-map.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-cfn-fn-find-in-map.js","sourceRoot":"","sources":["../../../../../../../src/service/cloudformation/template/node/fn/find-in-map/sim-cfn-fn-find-in-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGnD,OAAO,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;
|
|
1
|
+
{"version":3,"file":"sim-cfn-fn-find-in-map.js","sourceRoot":"","sources":["../../../../../../../src/service/cloudformation/template/node/fn/find-in-map/sim-cfn-fn-find-in-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGnD,OAAO,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAC7E,OAAO,EAAE,4BAA4B,EAAE,MAAM,iDAAiD,CAAC;AAE/F;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,UAAU;IAE5B,OAAO;IACP,WAAW;IACX,cAAc;IAHjC,YACmB,OAAmB,EACnB,WAAuB,EACvB,cAA0B;QAE3C,KAAK,EAAE,CAAC;uBAJS,OAAO;2BACP,WAAW;8BACX,cAAc;IAGjC,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,OAA6B;QACnC,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACvD,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAC/D,MAAM,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;QAErE,IACE,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC;YAC5B,CAAC,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC;YAChC,CAAC,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,EACnC,CAAC;YACD,OAAO;gBACL,eAAe,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,cAAc,CAAC;aACxD,CAAC;QACJ,CAAC;QAED,4DAA4D;QAC5D,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC;QAE5D,+BAA+B;QAC/B,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CACb,uDAAuD,OAAO,IAAI,WAAW,EAAE,CAChF,CAAC;QACJ,CAAC;QAED,4DAA4D;QAC5D,MAAM,KAAK,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAC;QACvC,aAAa,CACX,KAAK,EACL,uDAAuD,OAAO,IAAI,WAAW,IAAI,cAAc,EAAE,CAClG,CAAC;QAEF,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;OAEG;IACM,eAAe;QACtB,oBAAoB;QACpB,OAAO;YACL,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE;YACjC,GAAG,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE;YACrC,GAAG,IAAI,CAAC,cAAc,CAAC,eAAe,EAAE;SACzC,CAAC;IACJ,CAAC;IAEO,UAAU,CAChB,IAAgB,EAChB,OAA6B;QAE7B,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAEpC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,OAAO,KAAK,CAAC;QACf,CAAC;QAED,IAAI,4BAA4B,CAAC,KAAK,CAAC,EAAE,CAAC;YACxC,OAAO,KAAK,CAAC;QACf,CAAC;QAED,iCAAiC;QACjC,MAAM,IAAI,SAAS,CACjB,4EAA4E,OAAO,KAAK,EAAE,CAC3F,CAAC;IACJ,CAAC;IAEO,aAAa,CAAC,KAA0B;QAC9C,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;IACnC,CAAC;CACF"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { SimCfnResolveContext } from "../../../resolve/sim-cfn-resolve-context.js";
|
|
2
|
+
import type { SimCfnTemplateValue } from "../../../value/sim-cfn-template-value.js";
|
|
3
|
+
import { SimCfnNode } from "../../sim-cfn-node.js";
|
|
4
|
+
/**
|
|
5
|
+
* Simulated CloudFormation `Fn::If` intrinsic function.
|
|
6
|
+
*
|
|
7
|
+
* The Condition it names is already evaluated by the time a template value is
|
|
8
|
+
* resolved, so this only picks a branch. Only the branch it picks is resolved:
|
|
9
|
+
* the other one is left alone, as CloudFormation leaves it alone, so it can
|
|
10
|
+
* name something that the Stack being deployed does not have.
|
|
11
|
+
*/
|
|
12
|
+
export declare class SimCfnFnIf extends SimCfnNode {
|
|
13
|
+
private readonly conditionName;
|
|
14
|
+
private readonly whenTrue;
|
|
15
|
+
private readonly whenFalse;
|
|
16
|
+
constructor(conditionName: string, whenTrue: SimCfnNode, whenFalse: SimCfnNode);
|
|
17
|
+
/**
|
|
18
|
+
* Resolve only the branch the named Condition selects.
|
|
19
|
+
*/
|
|
20
|
+
resolve(context: SimCfnResolveContext): SimCfnTemplateValue;
|
|
21
|
+
/**
|
|
22
|
+
* Collect referenced names from both branches.
|
|
23
|
+
*
|
|
24
|
+
* Which branch is taken is not known while the dependency graph is being
|
|
25
|
+
* built, so both contribute. Ordering against a Resource that is never
|
|
26
|
+
* created costs nothing, where a missed dependency would create a Resource
|
|
27
|
+
* before the one it reads.
|
|
28
|
+
*/
|
|
29
|
+
referencedNames(): string[];
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=sim-cfn-fn-if.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cfn-fn-if.d.ts","sourceRoot":"","sources":["../../../../../../../src/service/cloudformation/template/node/fn/if/sim-cfn-fn-if.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACxF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD;;;;;;;GAOG;AACH,qBAAa,UAAW,SAAQ,UAAU;IAEtC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAH5B,YACmB,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,UAAU,EACpB,SAAS,EAAE,UAAU,EAGvC;IAED;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,oBAAoB,GAAG,mBAAmB,CAoB1D;IAED;;;;;;;OAOG;IACM,eAAe,IAAI,MAAM,EAAE,CAKnC;CACF"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { SimCfnNode } from "../../sim-cfn-node.js";
|
|
2
|
+
/**
|
|
3
|
+
* Simulated CloudFormation `Fn::If` intrinsic function.
|
|
4
|
+
*
|
|
5
|
+
* The Condition it names is already evaluated by the time a template value is
|
|
6
|
+
* resolved, so this only picks a branch. Only the branch it picks is resolved:
|
|
7
|
+
* the other one is left alone, as CloudFormation leaves it alone, so it can
|
|
8
|
+
* name something that the Stack being deployed does not have.
|
|
9
|
+
*/
|
|
10
|
+
export class SimCfnFnIf extends SimCfnNode {
|
|
11
|
+
conditionName;
|
|
12
|
+
whenTrue;
|
|
13
|
+
whenFalse;
|
|
14
|
+
constructor(conditionName, whenTrue, whenFalse) {
|
|
15
|
+
super();
|
|
16
|
+
this.conditionName = conditionName;
|
|
17
|
+
this.whenTrue = whenTrue;
|
|
18
|
+
this.whenFalse = whenFalse;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Resolve only the branch the named Condition selects.
|
|
22
|
+
*/
|
|
23
|
+
resolve(context) {
|
|
24
|
+
const conditions = context.conditions;
|
|
25
|
+
if (conditions === undefined) {
|
|
26
|
+
throw new Error(`Sim CloudFormation Fn::If ${this.conditionName} cannot be resolved ` +
|
|
27
|
+
"where the template Conditions are not available");
|
|
28
|
+
}
|
|
29
|
+
if (!conditions.has(this.conditionName)) {
|
|
30
|
+
throw new Error(`Sim CloudFormation Fn::If names Condition ${this.conditionName}, ` +
|
|
31
|
+
"which the template does not define");
|
|
32
|
+
}
|
|
33
|
+
return conditions.value(this.conditionName)
|
|
34
|
+
? this.whenTrue.resolve(context)
|
|
35
|
+
: this.whenFalse.resolve(context);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Collect referenced names from both branches.
|
|
39
|
+
*
|
|
40
|
+
* Which branch is taken is not known while the dependency graph is being
|
|
41
|
+
* built, so both contribute. Ordering against a Resource that is never
|
|
42
|
+
* created costs nothing, where a missed dependency would create a Resource
|
|
43
|
+
* before the one it reads.
|
|
44
|
+
*/
|
|
45
|
+
referencedNames() {
|
|
46
|
+
return [
|
|
47
|
+
...this.whenTrue.referencedNames(),
|
|
48
|
+
...this.whenFalse.referencedNames(),
|
|
49
|
+
];
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=sim-cfn-fn-if.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cfn-fn-if.js","sourceRoot":"","sources":["../../../../../../../src/service/cloudformation/template/node/fn/if/sim-cfn-fn-if.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD;;;;;;;GAOG;AACH,MAAM,OAAO,UAAW,SAAQ,UAAU;IAErB,aAAa;IACb,QAAQ;IACR,SAAS;IAH5B,YACmB,aAAqB,EACrB,QAAoB,EACpB,SAAqB;QAEtC,KAAK,EAAE,CAAC;6BAJS,aAAa;wBACb,QAAQ;yBACR,SAAS;IAG5B,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,OAA6B;QACnC,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QAEtC,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CACb,6BAA6B,IAAI,CAAC,aAAa,sBAAsB;gBACnE,iDAAiD,CACpD,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC;YACxC,MAAM,IAAI,KAAK,CACb,6CAA6C,IAAI,CAAC,aAAa,IAAI;gBACjE,oCAAoC,CACvC,CAAC;QACJ,CAAC;QAED,OAAO,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC;YACzC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC;YAChC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;IAED;;;;;;;OAOG;IACM,eAAe;QACtB,OAAO;YACL,GAAG,IAAI,CAAC,QAAQ,CAAC,eAAe,EAAE;YAClC,GAAG,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE;SACpC,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { SimCfnNode } from "../../sim-cfn-node.js";
|
|
2
|
+
import type { SimCfnResolveContext } from "../../../resolve/sim-cfn-resolve-context.js";
|
|
3
|
+
import type { SimCfnTemplateValue } from "../../../value/sim-cfn-template-value.js";
|
|
4
|
+
/**
|
|
5
|
+
* Simulated CloudFormation `Fn::Select` intrinsic function.
|
|
6
|
+
*
|
|
7
|
+
* Standard shape:
|
|
8
|
+
*
|
|
9
|
+
* {
|
|
10
|
+
* "Fn::Select": [2, { "Fn::Split": ["/", "https://example.com/path"] }]
|
|
11
|
+
* }
|
|
12
|
+
*/
|
|
13
|
+
export declare class SimCfnFnSelect extends SimCfnNode {
|
|
14
|
+
private readonly index;
|
|
15
|
+
private readonly values;
|
|
16
|
+
constructor(index: SimCfnNode, values: SimCfnNode);
|
|
17
|
+
/**
|
|
18
|
+
* Pick the value at the zero-based index.
|
|
19
|
+
*
|
|
20
|
+
* An index or a list that is still an unresolved expression re-emits this
|
|
21
|
+
* function in template form, so a later resolution pass can finish it once
|
|
22
|
+
* the Resources it reads exist. The picked value itself may be unresolved,
|
|
23
|
+
* which the same later pass resolves.
|
|
24
|
+
*/
|
|
25
|
+
resolve(context: SimCfnResolveContext): SimCfnTemplateValue;
|
|
26
|
+
/**
|
|
27
|
+
* Collect referenced names from the index and the list.
|
|
28
|
+
*/
|
|
29
|
+
referencedNames(): string[];
|
|
30
|
+
private valueAt;
|
|
31
|
+
/**
|
|
32
|
+
* The list position an index argument names.
|
|
33
|
+
*
|
|
34
|
+
* CloudFormation accepts the index as a JSON number or as a string, because
|
|
35
|
+
* a `Ref` to a Parameter can only give a string.
|
|
36
|
+
*/
|
|
37
|
+
private position;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=sim-cfn-fn-select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cfn-fn-select.d.ts","sourceRoot":"","sources":["../../../../../../../src/service/cloudformation/template/node/fn/select/sim-cfn-fn-select.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACxF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAOpF;;;;;;;;GAQG;AACH,qBAAa,cAAe,SAAQ,UAAU;IAE1C,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFzB,YACmB,KAAK,EAAE,UAAU,EACjB,MAAM,EAAE,UAAU,EAGpC;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,OAAO,EAAE,oBAAoB,GAAG,mBAAmB,CA0B1D;IAED;;OAEG;IACM,eAAe,IAAI,MAAM,EAAE,CAEnC;IAED,OAAO,CAAC,OAAO;IAqBf;;;;;OAKG;IACH,OAAO,CAAC,QAAQ;CAiBjB"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { SimCfnNode } from "../../sim-cfn-node.js";
|
|
2
|
+
import { isSimCfnUnresolvedExpression } from "../../../value/sim-cfn-unresolved-expression.js";
|
|
3
|
+
import { assertDefined } from "../../../../../../util/type-guard/defined.js";
|
|
4
|
+
/** A whole number written as a string, as JSON templates often write it. */
|
|
5
|
+
const wholeNumber = /^\d+$/u;
|
|
6
|
+
/**
|
|
7
|
+
* Simulated CloudFormation `Fn::Select` intrinsic function.
|
|
8
|
+
*
|
|
9
|
+
* Standard shape:
|
|
10
|
+
*
|
|
11
|
+
* {
|
|
12
|
+
* "Fn::Select": [2, { "Fn::Split": ["/", "https://example.com/path"] }]
|
|
13
|
+
* }
|
|
14
|
+
*/
|
|
15
|
+
export class SimCfnFnSelect extends SimCfnNode {
|
|
16
|
+
index;
|
|
17
|
+
values;
|
|
18
|
+
constructor(index, values) {
|
|
19
|
+
super();
|
|
20
|
+
this.index = index;
|
|
21
|
+
this.values = values;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Pick the value at the zero-based index.
|
|
25
|
+
*
|
|
26
|
+
* An index or a list that is still an unresolved expression re-emits this
|
|
27
|
+
* function in template form, so a later resolution pass can finish it once
|
|
28
|
+
* the Resources it reads exist. The picked value itself may be unresolved,
|
|
29
|
+
* which the same later pass resolves.
|
|
30
|
+
*/
|
|
31
|
+
resolve(context) {
|
|
32
|
+
const index = this.index.resolve(context);
|
|
33
|
+
const values = this.values.resolve(context);
|
|
34
|
+
if (isSimCfnUnresolvedExpression(index) ||
|
|
35
|
+
isSimCfnUnresolvedExpression(values)) {
|
|
36
|
+
return { "Fn::Select": [index, values] };
|
|
37
|
+
}
|
|
38
|
+
if (!Array.isArray(values)) {
|
|
39
|
+
throw new TypeError(`Sim CloudFormation Fn::Select values must resolve to a list, got ${typeof values}`);
|
|
40
|
+
}
|
|
41
|
+
// CloudFormation rejects a list with a null in it, whichever value the
|
|
42
|
+
// index picks, so this is refused rather than selected from.
|
|
43
|
+
if (values.includes(null)) {
|
|
44
|
+
throw new TypeError("Sim CloudFormation Fn::Select values must not contain null");
|
|
45
|
+
}
|
|
46
|
+
return this.valueAt(this.position(index), values);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Collect referenced names from the index and the list.
|
|
50
|
+
*/
|
|
51
|
+
referencedNames() {
|
|
52
|
+
return [...this.index.referencedNames(), ...this.values.referencedNames()];
|
|
53
|
+
}
|
|
54
|
+
valueAt(position, values) {
|
|
55
|
+
if (position >= values.length) {
|
|
56
|
+
throw new RangeError(`Sim CloudFormation Fn::Select index ${String(position)} is out of ` +
|
|
57
|
+
`range for a list of ${String(values.length)} values`);
|
|
58
|
+
}
|
|
59
|
+
// eslint-disable-next-line security/detect-object-injection -- checked above
|
|
60
|
+
const value = values[position];
|
|
61
|
+
assertDefined(value, `Sim CloudFormation Fn::Select found no value at index ${String(position)}`);
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The list position an index argument names.
|
|
66
|
+
*
|
|
67
|
+
* CloudFormation accepts the index as a JSON number or as a string, because
|
|
68
|
+
* a `Ref` to a Parameter can only give a string.
|
|
69
|
+
*/
|
|
70
|
+
position(index) {
|
|
71
|
+
if (typeof index === "number" &&
|
|
72
|
+
Number.isSafeInteger(index) &&
|
|
73
|
+
index >= 0) {
|
|
74
|
+
return index;
|
|
75
|
+
}
|
|
76
|
+
if (typeof index === "string" && wholeNumber.test(index)) {
|
|
77
|
+
return Number(index);
|
|
78
|
+
}
|
|
79
|
+
throw new TypeError(`Sim CloudFormation Fn::Select index must be a whole number, got ${JSON.stringify(index)}`);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=sim-cfn-fn-select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cfn-fn-select.js","sourceRoot":"","sources":["../../../../../../../src/service/cloudformation/template/node/fn/select/sim-cfn-fn-select.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGnD,OAAO,EAAE,4BAA4B,EAAE,MAAM,iDAAiD,CAAC;AAC/F,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAE7E,4EAA4E;AAC5E,MAAM,WAAW,GAAG,QAAQ,CAAC;AAE7B;;;;;;;;GAQG;AACH,MAAM,OAAO,cAAe,SAAQ,UAAU;IAEzB,KAAK;IACL,MAAM;IAFzB,YACmB,KAAiB,EACjB,MAAkB;QAEnC,KAAK,EAAE,CAAC;qBAHS,KAAK;sBACL,MAAM;IAGzB,CAAC;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,OAA6B;QACnC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC1C,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAE5C,IACE,4BAA4B,CAAC,KAAK,CAAC;YACnC,4BAA4B,CAAC,MAAM,CAAC,EACpC,CAAC;YACD,OAAO,EAAE,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,CAAC;QAC3C,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YAC3B,MAAM,IAAI,SAAS,CACjB,oEAAoE,OAAO,MAAM,EAAE,CACpF,CAAC;QACJ,CAAC;QAED,uEAAuE;QACvE,6DAA6D;QAC7D,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,SAAS,CACjB,4DAA4D,CAC7D,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC;IACpD,CAAC;IAED;;OAEG;IACM,eAAe;QACtB,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE,CAAC,CAAC;IAC7E,CAAC;IAEO,OAAO,CACb,QAAgB,EAChB,MAAsC;QAEtC,IAAI,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;YAC9B,MAAM,IAAI,UAAU,CAClB,uCAAuC,MAAM,CAAC,QAAQ,CAAC,aAAa;gBAClE,uBAAuB,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CACxD,CAAC;QACJ,CAAC;QAED,6EAA6E;QAC7E,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC/B,aAAa,CACX,KAAK,EACL,yDAAyD,MAAM,CAAC,QAAQ,CAAC,EAAE,CAC5E,CAAC;QAEF,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;;;OAKG;IACK,QAAQ,CAAC,KAA0B;QACzC,IACE,OAAO,KAAK,KAAK,QAAQ;YACzB,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC;YAC3B,KAAK,IAAI,CAAC,EACV,CAAC;YACD,OAAO,KAAK,CAAC;QACf,CAAC;QAED,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACzD,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;QAED,MAAM,IAAI,SAAS,CACjB,mEAAmE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAC3F,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { SimCfnNode } from "../../sim-cfn-node.js";
|
|
2
|
+
import type { SimCfnResolveContext } from "../../../resolve/sim-cfn-resolve-context.js";
|
|
3
|
+
import type { SimCfnTemplateValue } from "../../../value/sim-cfn-template-value.js";
|
|
4
|
+
/**
|
|
5
|
+
* Simulated CloudFormation `Fn::Split` intrinsic function.
|
|
6
|
+
*
|
|
7
|
+
* Standard shape:
|
|
8
|
+
*
|
|
9
|
+
* {
|
|
10
|
+
* "Fn::Split": ["/", { "Fn::GetAtt": ["Url", "FunctionUrl"] }]
|
|
11
|
+
* }
|
|
12
|
+
*/
|
|
13
|
+
export declare class SimCfnFnSplit extends SimCfnNode {
|
|
14
|
+
private readonly delimiter;
|
|
15
|
+
private readonly source;
|
|
16
|
+
constructor(delimiter: string, source: SimCfnNode);
|
|
17
|
+
/**
|
|
18
|
+
* Split the resolved source string on the delimiter.
|
|
19
|
+
*
|
|
20
|
+
* Splitting happens only once the source has resolved to a string. A source
|
|
21
|
+
* that is still an unresolved expression, such as an `Fn::GetAtt` read
|
|
22
|
+
* before Resources exist, re-emits this function in template form for a
|
|
23
|
+
* later resolution pass to finish.
|
|
24
|
+
*/
|
|
25
|
+
resolve(context: SimCfnResolveContext): SimCfnTemplateValue;
|
|
26
|
+
/**
|
|
27
|
+
* Collect referenced names from the source expression.
|
|
28
|
+
*/
|
|
29
|
+
referencedNames(): string[];
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=sim-cfn-fn-split.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cfn-fn-split.d.ts","sourceRoot":"","sources":["../../../../../../../src/service/cloudformation/template/node/fn/split/sim-cfn-fn-split.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACxF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAGpF;;;;;;;;GAQG;AACH,qBAAa,aAAc,SAAQ,UAAU;IAEzC,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFzB,YACmB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,UAAU,EAGpC;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,OAAO,EAAE,oBAAoB,GAAG,mBAAmB,CAc1D;IAED;;OAEG;IACM,eAAe,IAAI,MAAM,EAAE,CAEnC;CACF"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { SimCfnNode } from "../../sim-cfn-node.js";
|
|
2
|
+
import { isSimCfnUnresolvedExpression } from "../../../value/sim-cfn-unresolved-expression.js";
|
|
3
|
+
/**
|
|
4
|
+
* Simulated CloudFormation `Fn::Split` intrinsic function.
|
|
5
|
+
*
|
|
6
|
+
* Standard shape:
|
|
7
|
+
*
|
|
8
|
+
* {
|
|
9
|
+
* "Fn::Split": ["/", { "Fn::GetAtt": ["Url", "FunctionUrl"] }]
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export class SimCfnFnSplit extends SimCfnNode {
|
|
13
|
+
delimiter;
|
|
14
|
+
source;
|
|
15
|
+
constructor(delimiter, source) {
|
|
16
|
+
super();
|
|
17
|
+
this.delimiter = delimiter;
|
|
18
|
+
this.source = source;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Split the resolved source string on the delimiter.
|
|
22
|
+
*
|
|
23
|
+
* Splitting happens only once the source has resolved to a string. A source
|
|
24
|
+
* that is still an unresolved expression, such as an `Fn::GetAtt` read
|
|
25
|
+
* before Resources exist, re-emits this function in template form for a
|
|
26
|
+
* later resolution pass to finish.
|
|
27
|
+
*/
|
|
28
|
+
resolve(context) {
|
|
29
|
+
const source = this.source.resolve(context);
|
|
30
|
+
if (typeof source === "string") {
|
|
31
|
+
return source.split(this.delimiter);
|
|
32
|
+
}
|
|
33
|
+
if (isSimCfnUnresolvedExpression(source)) {
|
|
34
|
+
return { "Fn::Split": [this.delimiter, source] };
|
|
35
|
+
}
|
|
36
|
+
throw new TypeError(`Sim CloudFormation Fn::Split source must resolve to a string, got ${typeof source}`);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Collect referenced names from the source expression.
|
|
40
|
+
*/
|
|
41
|
+
referencedNames() {
|
|
42
|
+
return this.source.referencedNames();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=sim-cfn-fn-split.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cfn-fn-split.js","sourceRoot":"","sources":["../../../../../../../src/service/cloudformation/template/node/fn/split/sim-cfn-fn-split.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGnD,OAAO,EAAE,4BAA4B,EAAE,MAAM,iDAAiD,CAAC;AAE/F;;;;;;;;GAQG;AACH,MAAM,OAAO,aAAc,SAAQ,UAAU;IAExB,SAAS;IACT,MAAM;IAFzB,YACmB,SAAiB,EACjB,MAAkB;QAEnC,KAAK,EAAE,CAAC;yBAHS,SAAS;sBACT,MAAM;IAGzB,CAAC;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,OAA6B;QACnC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAE5C,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC/B,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACtC,CAAC;QAED,IAAI,4BAA4B,CAAC,MAAM,CAAC,EAAE,CAAC;YACzC,OAAO,EAAE,WAAW,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE,CAAC;QACnD,CAAC;QAED,MAAM,IAAI,SAAS,CACjB,qEAAqE,OAAO,MAAM,EAAE,CACrF,CAAC;IACJ,CAAC;IAED;;OAEG;IACM,eAAe;QACtB,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE,CAAC;IACvC,CAAC;CACF"}
|
|
@@ -8,7 +8,7 @@ export declare class SimCfnList extends SimCfnNode {
|
|
|
8
8
|
private readonly items;
|
|
9
9
|
constructor(items: readonly SimCfnNode[]);
|
|
10
10
|
/**
|
|
11
|
-
* Resolve each item in the list.
|
|
11
|
+
* Resolve each item in the list, naming the position of one that fails.
|
|
12
12
|
*/
|
|
13
13
|
resolve(context: SimCfnResolveContext): SimCfnTemplateValue[];
|
|
14
14
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-cfn-list.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudformation/template/node/sim-cfn-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"sim-cfn-list.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudformation/template/node/sim-cfn-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAGlF;;GAEG;AACH,qBAAa,UAAW,SAAQ,UAAU;IAC5B,OAAO,CAAC,QAAQ,CAAC,KAAK;IAAlC,YAA6B,KAAK,EAAE,SAAS,UAAU,EAAE,EAExD;IAED;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,oBAAoB,GAAG,mBAAmB,EAAE,CAI5D;IAED;;OAEG;IACM,eAAe,IAAI,MAAM,EAAE,CAEnC;CACF"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SimCfnNode } from "./sim-cfn-node.js";
|
|
2
|
+
import { resolveSimCfnValueAt } from "../value/sim-cfn-value-path.js";
|
|
2
3
|
/**
|
|
3
4
|
* A CloudFormation template array of nodes.
|
|
4
5
|
*/
|
|
@@ -9,10 +10,10 @@ export class SimCfnList extends SimCfnNode {
|
|
|
9
10
|
this.items = items;
|
|
10
11
|
}
|
|
11
12
|
/**
|
|
12
|
-
* Resolve each item in the list.
|
|
13
|
+
* Resolve each item in the list, naming the position of one that fails.
|
|
13
14
|
*/
|
|
14
15
|
resolve(context) {
|
|
15
|
-
return this.items.map((item) => item.resolve(context));
|
|
16
|
+
return this.items.map((item, position) => resolveSimCfnValueAt(position, () => item.resolve(context)));
|
|
16
17
|
}
|
|
17
18
|
/**
|
|
18
19
|
* Collect referenced names from every item.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-cfn-list.js","sourceRoot":"","sources":["../../../../../src/service/cloudformation/template/node/sim-cfn-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"sim-cfn-list.js","sourceRoot":"","sources":["../../../../../src/service/cloudformation/template/node/sim-cfn-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAEtE;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,UAAU;IACX,KAAK;IAAlC,YAA6B,KAA4B;QACvD,KAAK,EAAE,CAAC;qBADmB,KAAK;IAElC,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,OAA6B;QACnC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,CACvC,oBAAoB,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAC5D,CAAC;IACJ,CAAC;IAED;;OAEG;IACM,eAAe;QACtB,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC;IAC9D,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-cfn-object.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudformation/template/node/sim-cfn-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AACpF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"sim-cfn-object.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudformation/template/node/sim-cfn-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AACpF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAGlF;;GAEG;AACH,qBAAa,YAAa,SAAQ,UAAU;IAC9B,OAAO,CAAC,QAAQ,CAAC,OAAO;IAApC,YAA6B,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,EAEpE;IAED;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,oBAAoB,GAAG,yBAAyB,CAOhE;IAED;;OAEG;IACM,eAAe,IAAI,MAAM,EAAE,CAKnC;CACF"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SimCfnNode } from "./sim-cfn-node.js";
|
|
2
|
+
import { resolveSimCfnValueAt } from "../value/sim-cfn-value-path.js";
|
|
2
3
|
/**
|
|
3
4
|
* A plain CloudFormation template object (one that is not an intrinsic function).
|
|
4
5
|
*/
|
|
@@ -12,7 +13,10 @@ export class SimCfnObject extends SimCfnNode {
|
|
|
12
13
|
* Resolve each property value in the object.
|
|
13
14
|
*/
|
|
14
15
|
resolve(context) {
|
|
15
|
-
return Object.fromEntries([...this.entries].map(([key, node]) => [
|
|
16
|
+
return Object.fromEntries([...this.entries].map(([key, node]) => [
|
|
17
|
+
key,
|
|
18
|
+
resolveSimCfnValueAt(key, () => node.resolve(context)),
|
|
19
|
+
]));
|
|
16
20
|
}
|
|
17
21
|
/**
|
|
18
22
|
* Collect referenced names from every property value.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-cfn-object.js","sourceRoot":"","sources":["../../../../../src/service/cloudformation/template/node/sim-cfn-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"sim-cfn-object.js","sourceRoot":"","sources":["../../../../../src/service/cloudformation/template/node/sim-cfn-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAEtE;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,UAAU;IACb,OAAO;IAApC,YAA6B,OAAwC;QACnE,KAAK,EAAE,CAAC;uBADmB,OAAO;IAEpC,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,OAA6B;QACnC,OAAO,MAAM,CAAC,WAAW,CACvB,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC;YACrC,GAAG;YACH,oBAAoB,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;SACvD,CAAC,CACH,CAAC;IACJ,CAAC;IAED;;OAEG;IACM,eAAe;QACtB,OAAO,IAAI,CAAC,OAAO;aAChB,MAAM,EAAE;aACR,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;aACzC,OAAO,EAAE,CAAC;IACf,CAAC;CACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SimCfnFnIf as SimCfnFunctionIf } from "../../../node/fn/if/sim-cfn-fn-if.js";
|
|
2
|
+
import type { SimCfnTemplateValue } from "../../../value/sim-cfn-template-value.js";
|
|
3
|
+
import type { SimCfnValueParser } from "../../value/sim-cfn-value-parser.type.js";
|
|
4
|
+
/**
|
|
5
|
+
* Parses CloudFormation Fn::If values.
|
|
6
|
+
*/
|
|
7
|
+
export declare class SimCfnFnIfParser {
|
|
8
|
+
private readonly valueParser;
|
|
9
|
+
constructor(valueParser: SimCfnValueParser);
|
|
10
|
+
/**
|
|
11
|
+
* Parse and validate the value inside a Fn::If expression.
|
|
12
|
+
*
|
|
13
|
+
* Both branches are parsed, because a branch that is not valid template
|
|
14
|
+
* syntax is a template mistake whichever way the Condition falls. Only
|
|
15
|
+
* resolving is deferred to the branch the Condition selects.
|
|
16
|
+
*/
|
|
17
|
+
parse(value: SimCfnTemplateValue): SimCfnFunctionIf;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=sim-cfn-fn-if-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cfn-fn-if-parser.d.ts","sourceRoot":"","sources":["../../../../../../../src/service/cloudformation/template/parse/fn/if/sim-cfn-fn-if-parser.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAElF;;GAEG;AACH,qBAAa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,WAAW;IAAxC,YAA6B,WAAW,EAAE,iBAAiB,EAAI;IAE/D;;;;;;OAMG;IACH,KAAK,CAAC,KAAK,EAAE,mBAAmB,GAAG,gBAAgB,CAyBlD;CACF"}
|