terraconstructs 0.0.25 → 0.1.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/.jsii +83665 -54911
- package/.mise.toml +1 -1
- package/.nvmrc +1 -1
- package/LICENSE +202 -674
- package/lib/asset-manager.d.ts +23 -0
- package/lib/asset-manager.js +3 -0
- package/lib/asset-staging.d.ts +178 -0
- package/lib/asset-staging.js +589 -0
- package/lib/assets.d.ts +359 -0
- package/lib/assets.js +55 -0
- package/lib/aws/arn.js +16 -15
- package/lib/aws/aws-asset-manager.d.ts +91 -0
- package/lib/aws/aws-asset-manager.js +244 -0
- package/lib/aws/aws-construct.js +1 -1
- package/lib/aws/aws-stack.d.ts +37 -0
- package/lib/aws/aws-stack.js +30 -9
- package/lib/aws/aws-tags.js +2 -2
- package/lib/aws/cloudwatch/actions/appscaling.d.ts +15 -0
- package/lib/aws/cloudwatch/actions/appscaling.js +24 -0
- package/lib/aws/cloudwatch/actions/ec2.js +1 -1
- package/lib/aws/cloudwatch/actions/index.d.ts +3 -0
- package/lib/aws/cloudwatch/actions/index.js +4 -4
- package/lib/aws/cloudwatch/actions/lambda.js +1 -1
- package/lib/aws/cloudwatch/actions/sns.d.ts +14 -0
- package/lib/aws/cloudwatch/actions/sns.js +23 -0
- package/lib/aws/cloudwatch/actions/ssm.d.ts +72 -0
- package/lib/aws/cloudwatch/actions/ssm.js +104 -0
- package/lib/aws/cloudwatch/alarm-base.js +1 -1
- package/lib/aws/cloudwatch/alarm-rule.js +1 -1
- package/lib/aws/cloudwatch/alarm-status-widget.js +1 -1
- package/lib/aws/cloudwatch/alarm.js +1 -1
- package/lib/aws/cloudwatch/composite-alarm.js +1 -1
- package/lib/aws/cloudwatch/dashboard.js +1 -1
- package/lib/aws/cloudwatch/data-protection-policy.js +3 -3
- package/lib/aws/cloudwatch/graph.js +8 -8
- package/lib/aws/cloudwatch/layout.js +3 -3
- package/lib/aws/cloudwatch/log-destinations/kinesis.js +1 -1
- package/lib/aws/cloudwatch/log-destinations/lambda.js +1 -1
- package/lib/aws/cloudwatch/log-group.js +1 -1
- package/lib/aws/cloudwatch/log-query.js +1 -1
- package/lib/aws/cloudwatch/log-stream.js +1 -1
- package/lib/aws/cloudwatch/metric-filter.js +1 -1
- package/lib/aws/cloudwatch/metric.js +2 -2
- package/lib/aws/cloudwatch/pattern.js +3 -3
- package/lib/aws/cloudwatch/policy.js +1 -1
- package/lib/aws/cloudwatch/query-definition.js +2 -2
- package/lib/aws/cloudwatch/stats.js +1 -1
- package/lib/aws/cloudwatch/subscription-filter.js +1 -1
- package/lib/aws/cloudwatch/text.js +1 -1
- package/lib/aws/cloudwatch/variable.js +3 -3
- package/lib/aws/cloudwatch/widget.js +1 -1
- package/lib/aws/compute/access-log.d.ts +478 -0
- package/lib/aws/compute/access-log.js +649 -0
- package/lib/aws/compute/activity.js +1 -1
- package/lib/aws/compute/alb/application-listener-action.js +1 -1
- package/lib/aws/compute/alb/application-listener-certificate.js +1 -1
- package/lib/aws/compute/alb/application-listener-rule.js +1 -1
- package/lib/aws/compute/alb/application-listener.js +1 -1
- package/lib/aws/compute/alb/application-load-balancer.js +1 -1
- package/lib/aws/compute/alb/application-target-group.js +1 -1
- package/lib/aws/compute/alb/conditions.js +1 -1
- package/lib/aws/compute/alb/trust-store-revocation.js +1 -1
- package/lib/aws/compute/alb/trust-store.js +1 -1
- package/lib/aws/compute/api-definition.d.ts +106 -0
- package/lib/aws/compute/api-definition.js +200 -0
- package/lib/aws/compute/api-key.d.ts +184 -0
- package/lib/aws/compute/api-key.js +197 -0
- package/lib/aws/compute/apigateway-canned-metrics.generated.d.ts +169 -0
- package/lib/aws/compute/apigateway-canned-metrics.generated.js +63 -0
- package/lib/aws/compute/apigateway-util.d.ts +31 -0
- package/lib/aws/compute/apigateway-util.js +152 -0
- package/lib/aws/compute/architecture.js +1 -1
- package/lib/aws/compute/aspects/require-imdsv2-aspect.js +2 -2
- package/lib/aws/compute/authorizer.d.ts +35 -0
- package/lib/aws/compute/authorizer.js +28 -0
- package/lib/aws/compute/authorizers/identity-source.d.ts +37 -0
- package/lib/aws/compute/authorizers/identity-source.js +61 -0
- package/lib/aws/compute/authorizers/index.d.ts +2 -0
- package/lib/aws/compute/authorizers/index.js +20 -0
- package/lib/aws/compute/authorizers/lambda.d.ts +140 -0
- package/lib/aws/compute/authorizers/lambda.js +208 -0
- package/lib/aws/compute/base-path-mapping.d.ts +49 -0
- package/lib/aws/compute/base-path-mapping.js +52 -0
- package/lib/aws/compute/base-scalable-attribute.js +3 -3
- package/lib/aws/compute/bastion-host.js +1 -1
- package/lib/aws/compute/chain.js +1 -1
- package/lib/aws/compute/client-vpn-authorization-rule.js +1 -1
- package/lib/aws/compute/client-vpn-endpoint.js +2 -2
- package/lib/aws/compute/client-vpn-route.js +2 -2
- package/lib/aws/compute/code.d.ts +415 -0
- package/lib/aws/compute/code.js +424 -0
- package/lib/aws/compute/condition.js +1 -1
- package/lib/aws/compute/connections.js +1 -1
- package/lib/aws/compute/cors.d.ts +102 -0
- package/lib/aws/compute/cors.js +33 -0
- package/lib/aws/compute/deployment.d.ts +83 -0
- package/lib/aws/compute/deployment.js +158 -0
- package/lib/aws/compute/domain-name.d.ts +153 -0
- package/lib/aws/compute/domain-name.js +158 -0
- package/lib/aws/compute/event-invoke-config.d.ts +2 -2
- package/lib/aws/compute/event-invoke-config.js +4 -4
- package/lib/aws/compute/event-source-filter.js +2 -2
- package/lib/aws/compute/event-source-mapping.d.ts +2 -2
- package/lib/aws/compute/event-source-mapping.js +9 -7
- package/lib/aws/compute/event-sources/s3-onfailure-destination.js +1 -1
- package/lib/aws/compute/event-sources/s3.js +1 -1
- package/lib/aws/compute/event-sources/sqs-dlq.js +1 -1
- package/lib/aws/compute/event-sources/sqs.js +3 -2
- package/lib/aws/compute/fields.js +4 -4
- package/lib/aws/compute/function-alias.d.ts +1 -0
- package/lib/aws/compute/function-alias.js +8 -2
- package/lib/aws/compute/function-base.d.ts +15 -0
- package/lib/aws/compute/function-base.js +4 -4
- package/lib/aws/compute/function-destinations/event-bridge.js +1 -1
- package/lib/aws/compute/function-destinations/function.js +1 -1
- package/lib/aws/compute/function-destinations/sqs.js +1 -1
- package/lib/aws/compute/function-nodejs/bundling.d.ts +75 -0
- package/lib/aws/compute/function-nodejs/bundling.js +405 -0
- package/lib/aws/compute/function-nodejs/function.d.ts +99 -0
- package/lib/aws/compute/function-nodejs/function.js +175 -0
- package/lib/aws/compute/function-nodejs/index.d.ts +2 -0
- package/lib/aws/compute/function-nodejs/index.js +19 -0
- package/lib/aws/compute/function-nodejs/package-installation.d.ts +8 -0
- package/lib/aws/compute/function-nodejs/package-installation.js +36 -0
- package/lib/aws/compute/function-nodejs/package-manager.d.ts +33 -0
- package/lib/aws/compute/function-nodejs/package-manager.js +99 -0
- package/lib/aws/compute/function-nodejs/types.d.ts +410 -0
- package/lib/aws/compute/function-nodejs/types.js +81 -0
- package/lib/aws/compute/function-nodejs/util.d.ts +60 -0
- package/lib/aws/compute/function-nodejs/util.js +202 -0
- package/lib/aws/compute/function-url.d.ts +2 -2
- package/lib/aws/compute/function-url.js +4 -4
- package/lib/aws/compute/function.d.ts +34 -4
- package/lib/aws/compute/function.js +91 -17
- package/lib/aws/compute/gateway-response.d.ts +157 -0
- package/lib/aws/compute/gateway-response.js +156 -0
- package/lib/aws/compute/handler.d.ts +10 -0
- package/lib/aws/compute/handler.js +20 -0
- package/lib/aws/compute/index.d.ts +27 -0
- package/lib/aws/compute/index.js +29 -1
- package/lib/aws/compute/instance-types.js +1 -1
- package/lib/aws/compute/instance.js +1 -1
- package/lib/aws/compute/integration.d.ts +311 -0
- package/lib/aws/compute/integration.js +165 -0
- package/lib/aws/compute/integrations/aws.d.ts +72 -0
- package/lib/aws/compute/integrations/aws.js +55 -0
- package/lib/aws/compute/integrations/http.d.ts +37 -0
- package/lib/aws/compute/integrations/http.js +35 -0
- package/lib/aws/compute/integrations/index.d.ts +6 -0
- package/lib/aws/compute/integrations/index.js +24 -0
- package/lib/aws/compute/integrations/lambda.d.ts +40 -0
- package/lib/aws/compute/integrations/lambda.js +73 -0
- package/lib/aws/compute/integrations/mock.d.ts +16 -0
- package/lib/aws/compute/integrations/mock.js +30 -0
- package/lib/aws/compute/integrations/request-context.d.ts +144 -0
- package/lib/aws/compute/integrations/request-context.js +3 -0
- package/lib/aws/compute/integrations/stepfunctions.d.ts +102 -0
- package/lib/aws/compute/integrations/stepfunctions.js +268 -0
- package/lib/aws/compute/ip-addresses.js +2 -2
- package/lib/aws/compute/ipam.js +1 -1
- package/lib/aws/compute/json-schema.d.ts +75 -0
- package/lib/aws/compute/json-schema.js +23 -0
- package/lib/aws/compute/key-pair.js +1 -1
- package/lib/aws/compute/lambda-api.d.ts +46 -0
- package/lib/aws/compute/lambda-api.js +64 -0
- package/lib/aws/compute/launch-template.js +2 -2
- package/lib/aws/compute/lb-shared/base-listener.js +1 -1
- package/lib/aws/compute/lb-shared/base-load-balancer.js +2 -2
- package/lib/aws/compute/lb-shared/base-target-group.js +1 -1
- package/lib/aws/compute/lb-shared/listener-certificate.js +1 -1
- package/lib/aws/compute/lb-shared/load-balancer-targets.js +2 -2
- package/lib/aws/compute/lb-targets/alb-target.js +3 -3
- package/lib/aws/compute/lb-targets/instance-target.js +2 -2
- package/lib/aws/compute/lb-targets/ip-target.js +1 -1
- package/lib/aws/compute/lb-targets/lambda-target.js +1 -1
- package/lib/aws/compute/load-balancer.js +3 -3
- package/lib/aws/compute/machine-image/amazon-linux-2022.js +2 -2
- package/lib/aws/compute/machine-image/amazon-linux-2023.js +2 -2
- package/lib/aws/compute/machine-image/amazon-linux2.js +2 -2
- package/lib/aws/compute/machine-image/common.js +1 -1
- package/lib/aws/compute/machine-image/machine-image.js +8 -8
- package/lib/aws/compute/method.d.ts +219 -0
- package/lib/aws/compute/method.js +396 -0
- package/lib/aws/compute/methodresponse.d.ts +28 -0
- package/lib/aws/compute/methodresponse.js +3 -0
- package/lib/aws/compute/model.d.ts +143 -0
- package/lib/aws/compute/model.js +141 -0
- package/lib/aws/compute/nat.js +5 -5
- package/lib/aws/compute/network-acl-types.js +2 -2
- package/lib/aws/compute/network-acl.js +3 -3
- package/lib/aws/compute/nlb/network-listener-action.js +1 -1
- package/lib/aws/compute/nlb/network-listener.js +1 -1
- package/lib/aws/compute/nlb/network-load-balancer.js +1 -1
- package/lib/aws/compute/nlb/network-target-group.js +1 -1
- package/lib/aws/compute/peer.js +1 -1
- package/lib/aws/compute/placement-group.js +1 -1
- package/lib/aws/compute/port.js +1 -1
- package/lib/aws/compute/prefix-list.js +1 -1
- package/lib/aws/compute/requestvalidator.d.ts +50 -0
- package/lib/aws/compute/requestvalidator.js +59 -0
- package/lib/aws/compute/resource.d.ts +223 -0
- package/lib/aws/compute/resource.js +316 -0
- package/lib/aws/compute/restapi.d.ts +510 -0
- package/lib/aws/compute/restapi.js +626 -0
- package/lib/aws/compute/route.js +8 -8
- package/lib/aws/compute/runtime.d.ts +282 -0
- package/lib/aws/compute/runtime.js +337 -0
- package/lib/aws/compute/scalable-target.js +3 -3
- package/lib/aws/compute/schedule.js +3 -3
- package/lib/aws/compute/security-group.js +1 -1
- package/lib/aws/compute/stage.d.ts +350 -0
- package/lib/aws/compute/stage.js +304 -0
- package/lib/aws/compute/state-graph.js +1 -1
- package/lib/aws/compute/state-machine-fragment.js +1 -1
- package/lib/aws/compute/state-machine.js +4 -4
- package/lib/aws/compute/states/choice.js +1 -1
- package/lib/aws/compute/states/custom-state.js +1 -1
- package/lib/aws/compute/states/distributed-map/item-batcher.js +1 -1
- package/lib/aws/compute/states/distributed-map/item-reader.js +5 -5
- package/lib/aws/compute/states/distributed-map/result-writer.js +1 -1
- package/lib/aws/compute/states/distributed-map.js +1 -1
- package/lib/aws/compute/states/fail.js +1 -1
- package/lib/aws/compute/states/map-base.js +1 -1
- package/lib/aws/compute/states/map.js +1 -1
- package/lib/aws/compute/states/parallel.js +1 -1
- package/lib/aws/compute/states/pass.js +2 -2
- package/lib/aws/compute/states/state.js +1 -1
- package/lib/aws/compute/states/succeed.js +1 -1
- package/lib/aws/compute/states/task-base.js +2 -2
- package/lib/aws/compute/states/task.js +1 -1
- package/lib/aws/compute/states/wait.js +2 -2
- package/lib/aws/compute/step-scaling-action.js +3 -3
- package/lib/aws/compute/step-scaling-policy.js +1 -1
- package/lib/aws/compute/stepfunctions-api.d.ts +103 -0
- package/lib/aws/compute/stepfunctions-api.js +39 -0
- package/lib/aws/compute/subnet-v2.js +2 -2
- package/lib/aws/compute/subnet.js +1 -1
- package/lib/aws/compute/target-tracking-scaling-policy.js +3 -3
- package/lib/aws/compute/task-credentials.js +1 -1
- package/lib/aws/compute/task-input.js +1 -1
- package/lib/aws/compute/tasks/aws-sdk/call-aws-service.js +1 -1
- package/lib/aws/compute/tasks/eventbridge/put-events.js +1 -1
- package/lib/aws/compute/tasks/http/invoke.js +1 -1
- package/lib/aws/compute/tasks/lambda/invoke.js +1 -1
- package/lib/aws/compute/tasks/sqs/send-message.js +1 -1
- package/lib/aws/compute/tasks/stepfunctions/invoke-activity.js +1 -1
- package/lib/aws/compute/tasks/stepfunctions/start-execution.js +1 -1
- package/lib/aws/compute/types.js +1 -1
- package/lib/aws/compute/usage-plan.d.ts +194 -0
- package/lib/aws/compute/usage-plan.js +174 -0
- package/lib/aws/compute/user-data.js +3 -3
- package/lib/aws/compute/volume.js +2 -2
- package/lib/aws/compute/vpc-endpoint-service.js +1 -1
- package/lib/aws/compute/vpc-endpoint.js +6 -6
- package/lib/aws/compute/vpc-flow-logs.js +4 -4
- package/lib/aws/compute/vpc-link.d.ts +104 -0
- package/lib/aws/compute/vpc-link.js +137 -0
- package/lib/aws/compute/vpc-v2-base.js +1 -1
- package/lib/aws/compute/vpc-v2.js +2 -2
- package/lib/aws/compute/vpc.js +4 -4
- package/lib/aws/compute/vpn.js +3 -3
- package/lib/aws/edge/certificate.js +1 -1
- package/lib/aws/edge/distribution.js +3 -3
- package/lib/aws/edge/dns-alias-record-targets.js +3 -3
- package/lib/aws/edge/dns-record.js +13 -13
- package/lib/aws/edge/dns-zone.js +1 -1
- package/lib/aws/edge/function.js +2 -2
- package/lib/aws/edge/key-value-store.js +4 -4
- package/lib/aws/edge/origin.js +3 -3
- package/lib/aws/edge/response-headers-policy.js +1 -1
- package/lib/aws/encryption/alias.js +1 -1
- package/lib/aws/encryption/key.js +1 -1
- package/lib/aws/encryption/via-service-principal.js +1 -1
- package/lib/aws/iam/grant.js +2 -2
- package/lib/aws/iam/group.js +1 -1
- package/lib/aws/iam/instance-profile.js +1 -1
- package/lib/aws/iam/managed-policy.js +1 -1
- package/lib/aws/iam/oidc-provider.js +1 -1
- package/lib/aws/iam/policy-document.js +1 -1
- package/lib/aws/iam/policy-statement.js +1 -1
- package/lib/aws/iam/policy.js +1 -1
- package/lib/aws/iam/principals.js +20 -20
- package/lib/aws/iam/role.js +1 -1
- package/lib/aws/iam/saml-provider.js +2 -2
- package/lib/aws/iam/unknown-principal.js +1 -1
- package/lib/aws/iam/user.js +5 -5
- package/lib/aws/index.d.ts +1 -0
- package/lib/aws/index.js +4 -1
- package/lib/aws/network/simple-ipv4-vpc.js +1 -1
- package/lib/aws/network/subnet-group.js +3 -3
- package/lib/aws/network/subnet.js +4 -4
- package/lib/aws/notify/archive.js +1 -1
- package/lib/aws/notify/connection.js +3 -3
- package/lib/aws/notify/event-bus.js +3 -3
- package/lib/aws/notify/event-pattern.js +1 -1
- package/lib/aws/notify/input.js +2 -2
- package/lib/aws/notify/kinesis-stream.js +1 -1
- package/lib/aws/notify/notification-rule.d.ts +1 -1
- package/lib/aws/notify/notification-rule.js +5 -5
- package/lib/aws/notify/policy.js +1 -1
- package/lib/aws/notify/queue-policy.js +1 -1
- package/lib/aws/notify/queue.js +1 -1
- package/lib/aws/notify/resource-policy.js +1 -1
- package/lib/aws/notify/rule.js +1 -1
- package/lib/aws/notify/schedule.js +1 -1
- package/lib/aws/notify/subscription-filter.js +1 -1
- package/lib/aws/notify/subscription.js +4 -4
- package/lib/aws/notify/subscriptions/email.js +1 -1
- package/lib/aws/notify/subscriptions/lambda.js +1 -1
- package/lib/aws/notify/subscriptions/sms.js +1 -1
- package/lib/aws/notify/subscriptions/sqs.js +1 -1
- package/lib/aws/notify/subscriptions/url.js +1 -1
- package/lib/aws/notify/targets/event-bus.js +1 -1
- package/lib/aws/notify/targets/function.js +1 -1
- package/lib/aws/notify/targets/log-group.js +2 -2
- package/lib/aws/notify/targets/sqs.js +1 -1
- package/lib/aws/notify/targets/state-machine.js +1 -1
- package/lib/aws/notify/topic-base.js +1 -1
- package/lib/aws/notify/topic.js +6 -5
- package/lib/aws/partition.d.ts +21 -0
- package/lib/aws/partition.js +42 -0
- package/lib/aws/storage/assets/image-asset.d.ts +379 -0
- package/lib/aws/storage/assets/image-asset.js +247 -0
- package/lib/aws/storage/assets/index.d.ts +2 -0
- package/lib/aws/storage/assets/index.js +21 -0
- package/lib/aws/storage/assets/s3.d.ts +125 -0
- package/lib/aws/storage/assets/s3.js +80 -0
- package/lib/aws/storage/auth-token.d.ts +25 -0
- package/lib/aws/storage/auth-token.js +54 -0
- package/lib/aws/storage/billing.js +1 -1
- package/lib/aws/storage/bucket-notifications.js +1 -1
- package/lib/aws/storage/bucket-policy.js +1 -1
- package/lib/aws/storage/bucket-source.d.ts +1 -1
- package/lib/aws/storage/bucket-source.js +4 -4
- package/lib/aws/storage/bucket.d.ts +14 -6
- package/lib/aws/storage/bucket.js +48 -40
- package/lib/aws/storage/capacity.js +1 -1
- package/lib/aws/storage/ecr-lifecycle.d.ts +88 -0
- package/lib/aws/storage/ecr-lifecycle.js +23 -0
- package/lib/aws/storage/ecr-repository.d.ts +446 -0
- package/lib/aws/storage/ecr-repository.js +685 -0
- package/lib/aws/storage/encryption.js +1 -1
- package/lib/aws/storage/index.d.ts +5 -0
- package/lib/aws/storage/index.js +10 -3
- package/lib/aws/storage/location.d.ts +17 -0
- package/lib/aws/storage/location.js +4 -0
- package/lib/aws/storage/notification-targets/function.js +1 -1
- package/lib/aws/storage/notification-targets/queue.js +1 -1
- package/lib/aws/storage/origin-access-identity.js +1 -1
- package/lib/aws/storage/parameter.js +2 -2
- package/lib/aws/storage/table.js +3 -3
- package/lib/aws/storage/util.d.ts +8 -20
- package/lib/aws/storage/util.js +56 -34
- package/lib/aws/util.d.ts +1 -0
- package/lib/aws/util.js +6 -1
- package/lib/bundling.d.ts +434 -0
- package/lib/bundling.js +368 -0
- package/lib/construct-base.js +2 -2
- package/lib/duration.js +1 -1
- package/lib/expiration.js +1 -1
- package/lib/fs/copy.d.ts +2 -0
- package/lib/fs/copy.js +57 -0
- package/lib/fs/fingerprint.d.ts +21 -0
- package/lib/fs/fingerprint.js +165 -0
- package/lib/fs/ignore.d.ts +107 -0
- package/lib/fs/ignore.js +190 -0
- package/lib/fs/index.d.ts +47 -0
- package/lib/fs/index.js +88 -0
- package/lib/fs/options.d.ts +110 -0
- package/lib/fs/options.js +60 -0
- package/lib/fs/utils.d.ts +11 -0
- package/lib/fs/utils.js +34 -0
- package/lib/index.d.ts +5 -0
- package/lib/index.js +7 -1
- package/lib/private/asset-staging.d.ts +83 -0
- package/lib/private/asset-staging.js +205 -0
- package/lib/private/cache.d.ts +17 -0
- package/lib/private/cache.js +35 -0
- package/lib/private/jsii-deprecated.d.ts +2 -0
- package/lib/private/jsii-deprecated.js +19 -0
- package/lib/private/unique-resource-name.js +3 -2
- package/lib/size.js +1 -1
- package/lib/stack-base.js +1 -1
- package/lib/terra-func.js +2 -2
- package/lib/time-zone.js +1 -1
- package/node_modules/@balena/dockerignore/CHANGELOG.md +31 -0
- package/node_modules/@balena/dockerignore/LICENSE.md +206 -0
- package/node_modules/@balena/dockerignore/README.md +261 -0
- package/node_modules/@balena/dockerignore/ignore.js +363 -0
- package/node_modules/@balena/dockerignore/index.d.ts +45 -0
- package/node_modules/@balena/dockerignore/package.json +49 -0
- package/node_modules/balanced-match/.github/FUNDING.yml +2 -0
- package/node_modules/balanced-match/LICENSE.md +21 -0
- package/node_modules/balanced-match/README.md +97 -0
- package/node_modules/balanced-match/index.js +62 -0
- package/node_modules/balanced-match/package.json +48 -0
- package/node_modules/concat-map/.travis.yml +4 -0
- package/node_modules/concat-map/LICENSE +18 -0
- package/node_modules/concat-map/README.markdown +62 -0
- package/node_modules/concat-map/example/map.js +6 -0
- package/node_modules/concat-map/index.js +13 -0
- package/node_modules/concat-map/package.json +43 -0
- package/node_modules/concat-map/test/map.js +39 -0
- package/node_modules/ignore/LICENSE-MIT +21 -0
- package/node_modules/ignore/README.md +412 -0
- package/node_modules/ignore/index.d.ts +61 -0
- package/node_modules/ignore/index.js +636 -0
- package/node_modules/ignore/legacy.js +559 -0
- package/node_modules/ignore/package.json +74 -0
- package/node_modules/minimatch/LICENSE +15 -0
- package/node_modules/minimatch/README.md +230 -0
- package/node_modules/minimatch/minimatch.js +947 -0
- package/node_modules/minimatch/node_modules/brace-expansion/LICENSE +21 -0
- package/node_modules/minimatch/node_modules/brace-expansion/README.md +129 -0
- package/node_modules/minimatch/node_modules/brace-expansion/index.js +201 -0
- package/node_modules/minimatch/node_modules/brace-expansion/package.json +47 -0
- package/node_modules/minimatch/package.json +33 -0
- package/package.json +14 -5
- package/lib/aws/compute/function-nodejs.d.ts +0 -55
- package/lib/aws/compute/function-nodejs.js +0 -70
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# brace-expansion
|
|
2
|
+
|
|
3
|
+
[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html),
|
|
4
|
+
as known from sh/bash, in JavaScript.
|
|
5
|
+
|
|
6
|
+
[](http://travis-ci.org/juliangruber/brace-expansion)
|
|
7
|
+
[](https://www.npmjs.org/package/brace-expansion)
|
|
8
|
+
[](https://greenkeeper.io/)
|
|
9
|
+
|
|
10
|
+
[](https://ci.testling.com/juliangruber/brace-expansion)
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```js
|
|
15
|
+
var expand = require('brace-expansion');
|
|
16
|
+
|
|
17
|
+
expand('file-{a,b,c}.jpg')
|
|
18
|
+
// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
|
|
19
|
+
|
|
20
|
+
expand('-v{,,}')
|
|
21
|
+
// => ['-v', '-v', '-v']
|
|
22
|
+
|
|
23
|
+
expand('file{0..2}.jpg')
|
|
24
|
+
// => ['file0.jpg', 'file1.jpg', 'file2.jpg']
|
|
25
|
+
|
|
26
|
+
expand('file-{a..c}.jpg')
|
|
27
|
+
// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
|
|
28
|
+
|
|
29
|
+
expand('file{2..0}.jpg')
|
|
30
|
+
// => ['file2.jpg', 'file1.jpg', 'file0.jpg']
|
|
31
|
+
|
|
32
|
+
expand('file{0..4..2}.jpg')
|
|
33
|
+
// => ['file0.jpg', 'file2.jpg', 'file4.jpg']
|
|
34
|
+
|
|
35
|
+
expand('file-{a..e..2}.jpg')
|
|
36
|
+
// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg']
|
|
37
|
+
|
|
38
|
+
expand('file{00..10..5}.jpg')
|
|
39
|
+
// => ['file00.jpg', 'file05.jpg', 'file10.jpg']
|
|
40
|
+
|
|
41
|
+
expand('{{A..C},{a..c}}')
|
|
42
|
+
// => ['A', 'B', 'C', 'a', 'b', 'c']
|
|
43
|
+
|
|
44
|
+
expand('ppp{,config,oe{,conf}}')
|
|
45
|
+
// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf']
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## API
|
|
49
|
+
|
|
50
|
+
```js
|
|
51
|
+
var expand = require('brace-expansion');
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### var expanded = expand(str)
|
|
55
|
+
|
|
56
|
+
Return an array of all possible and valid expansions of `str`. If none are
|
|
57
|
+
found, `[str]` is returned.
|
|
58
|
+
|
|
59
|
+
Valid expansions are:
|
|
60
|
+
|
|
61
|
+
```js
|
|
62
|
+
/^(.*,)+(.+)?$/
|
|
63
|
+
// {a,b,...}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.
|
|
67
|
+
|
|
68
|
+
```js
|
|
69
|
+
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
|
|
70
|
+
// {x..y[..incr]}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
A numeric sequence from `x` to `y` inclusive, with optional increment.
|
|
74
|
+
If `x` or `y` start with a leading `0`, all the numbers will be padded
|
|
75
|
+
to have equal length. Negative numbers and backwards iteration work too.
|
|
76
|
+
|
|
77
|
+
```js
|
|
78
|
+
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
|
|
79
|
+
// {x..y[..incr]}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
An alphabetic sequence from `x` to `y` inclusive, with optional increment.
|
|
83
|
+
`x` and `y` must be exactly one character, and if given, `incr` must be a
|
|
84
|
+
number.
|
|
85
|
+
|
|
86
|
+
For compatibility reasons, the string `${` is not eligible for brace expansion.
|
|
87
|
+
|
|
88
|
+
## Installation
|
|
89
|
+
|
|
90
|
+
With [npm](https://npmjs.org) do:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
npm install brace-expansion
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Contributors
|
|
97
|
+
|
|
98
|
+
- [Julian Gruber](https://github.com/juliangruber)
|
|
99
|
+
- [Isaac Z. Schlueter](https://github.com/isaacs)
|
|
100
|
+
|
|
101
|
+
## Sponsors
|
|
102
|
+
|
|
103
|
+
This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)!
|
|
104
|
+
|
|
105
|
+
Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)!
|
|
106
|
+
|
|
107
|
+
## License
|
|
108
|
+
|
|
109
|
+
(MIT)
|
|
110
|
+
|
|
111
|
+
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
|
|
112
|
+
|
|
113
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
114
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
115
|
+
the Software without restriction, including without limitation the rights to
|
|
116
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
117
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
118
|
+
so, subject to the following conditions:
|
|
119
|
+
|
|
120
|
+
The above copyright notice and this permission notice shall be included in all
|
|
121
|
+
copies or substantial portions of the Software.
|
|
122
|
+
|
|
123
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
124
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
125
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
126
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
127
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
128
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
129
|
+
SOFTWARE.
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
var concatMap = require('concat-map');
|
|
2
|
+
var balanced = require('balanced-match');
|
|
3
|
+
|
|
4
|
+
module.exports = expandTop;
|
|
5
|
+
|
|
6
|
+
var escSlash = '\0SLASH'+Math.random()+'\0';
|
|
7
|
+
var escOpen = '\0OPEN'+Math.random()+'\0';
|
|
8
|
+
var escClose = '\0CLOSE'+Math.random()+'\0';
|
|
9
|
+
var escComma = '\0COMMA'+Math.random()+'\0';
|
|
10
|
+
var escPeriod = '\0PERIOD'+Math.random()+'\0';
|
|
11
|
+
|
|
12
|
+
function numeric(str) {
|
|
13
|
+
return parseInt(str, 10) == str
|
|
14
|
+
? parseInt(str, 10)
|
|
15
|
+
: str.charCodeAt(0);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function escapeBraces(str) {
|
|
19
|
+
return str.split('\\\\').join(escSlash)
|
|
20
|
+
.split('\\{').join(escOpen)
|
|
21
|
+
.split('\\}').join(escClose)
|
|
22
|
+
.split('\\,').join(escComma)
|
|
23
|
+
.split('\\.').join(escPeriod);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function unescapeBraces(str) {
|
|
27
|
+
return str.split(escSlash).join('\\')
|
|
28
|
+
.split(escOpen).join('{')
|
|
29
|
+
.split(escClose).join('}')
|
|
30
|
+
.split(escComma).join(',')
|
|
31
|
+
.split(escPeriod).join('.');
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
// Basically just str.split(","), but handling cases
|
|
36
|
+
// where we have nested braced sections, which should be
|
|
37
|
+
// treated as individual members, like {a,{b,c},d}
|
|
38
|
+
function parseCommaParts(str) {
|
|
39
|
+
if (!str)
|
|
40
|
+
return [''];
|
|
41
|
+
|
|
42
|
+
var parts = [];
|
|
43
|
+
var m = balanced('{', '}', str);
|
|
44
|
+
|
|
45
|
+
if (!m)
|
|
46
|
+
return str.split(',');
|
|
47
|
+
|
|
48
|
+
var pre = m.pre;
|
|
49
|
+
var body = m.body;
|
|
50
|
+
var post = m.post;
|
|
51
|
+
var p = pre.split(',');
|
|
52
|
+
|
|
53
|
+
p[p.length-1] += '{' + body + '}';
|
|
54
|
+
var postParts = parseCommaParts(post);
|
|
55
|
+
if (post.length) {
|
|
56
|
+
p[p.length-1] += postParts.shift();
|
|
57
|
+
p.push.apply(p, postParts);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
parts.push.apply(parts, p);
|
|
61
|
+
|
|
62
|
+
return parts;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function expandTop(str) {
|
|
66
|
+
if (!str)
|
|
67
|
+
return [];
|
|
68
|
+
|
|
69
|
+
// I don't know why Bash 4.3 does this, but it does.
|
|
70
|
+
// Anything starting with {} will have the first two bytes preserved
|
|
71
|
+
// but *only* at the top level, so {},a}b will not expand to anything,
|
|
72
|
+
// but a{},b}c will be expanded to [a}c,abc].
|
|
73
|
+
// One could argue that this is a bug in Bash, but since the goal of
|
|
74
|
+
// this module is to match Bash's rules, we escape a leading {}
|
|
75
|
+
if (str.substr(0, 2) === '{}') {
|
|
76
|
+
str = '\\{\\}' + str.substr(2);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return expand(escapeBraces(str), true).map(unescapeBraces);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function identity(e) {
|
|
83
|
+
return e;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function embrace(str) {
|
|
87
|
+
return '{' + str + '}';
|
|
88
|
+
}
|
|
89
|
+
function isPadded(el) {
|
|
90
|
+
return /^-?0\d/.test(el);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function lte(i, y) {
|
|
94
|
+
return i <= y;
|
|
95
|
+
}
|
|
96
|
+
function gte(i, y) {
|
|
97
|
+
return i >= y;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function expand(str, isTop) {
|
|
101
|
+
var expansions = [];
|
|
102
|
+
|
|
103
|
+
var m = balanced('{', '}', str);
|
|
104
|
+
if (!m || /\$$/.test(m.pre)) return [str];
|
|
105
|
+
|
|
106
|
+
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
|
107
|
+
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
|
108
|
+
var isSequence = isNumericSequence || isAlphaSequence;
|
|
109
|
+
var isOptions = m.body.indexOf(',') >= 0;
|
|
110
|
+
if (!isSequence && !isOptions) {
|
|
111
|
+
// {a},b}
|
|
112
|
+
if (m.post.match(/,.*\}/)) {
|
|
113
|
+
str = m.pre + '{' + m.body + escClose + m.post;
|
|
114
|
+
return expand(str);
|
|
115
|
+
}
|
|
116
|
+
return [str];
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
var n;
|
|
120
|
+
if (isSequence) {
|
|
121
|
+
n = m.body.split(/\.\./);
|
|
122
|
+
} else {
|
|
123
|
+
n = parseCommaParts(m.body);
|
|
124
|
+
if (n.length === 1) {
|
|
125
|
+
// x{{a,b}}y ==> x{a}y x{b}y
|
|
126
|
+
n = expand(n[0], false).map(embrace);
|
|
127
|
+
if (n.length === 1) {
|
|
128
|
+
var post = m.post.length
|
|
129
|
+
? expand(m.post, false)
|
|
130
|
+
: [''];
|
|
131
|
+
return post.map(function(p) {
|
|
132
|
+
return m.pre + n[0] + p;
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// at this point, n is the parts, and we know it's not a comma set
|
|
139
|
+
// with a single entry.
|
|
140
|
+
|
|
141
|
+
// no need to expand pre, since it is guaranteed to be free of brace-sets
|
|
142
|
+
var pre = m.pre;
|
|
143
|
+
var post = m.post.length
|
|
144
|
+
? expand(m.post, false)
|
|
145
|
+
: [''];
|
|
146
|
+
|
|
147
|
+
var N;
|
|
148
|
+
|
|
149
|
+
if (isSequence) {
|
|
150
|
+
var x = numeric(n[0]);
|
|
151
|
+
var y = numeric(n[1]);
|
|
152
|
+
var width = Math.max(n[0].length, n[1].length)
|
|
153
|
+
var incr = n.length == 3
|
|
154
|
+
? Math.abs(numeric(n[2]))
|
|
155
|
+
: 1;
|
|
156
|
+
var test = lte;
|
|
157
|
+
var reverse = y < x;
|
|
158
|
+
if (reverse) {
|
|
159
|
+
incr *= -1;
|
|
160
|
+
test = gte;
|
|
161
|
+
}
|
|
162
|
+
var pad = n.some(isPadded);
|
|
163
|
+
|
|
164
|
+
N = [];
|
|
165
|
+
|
|
166
|
+
for (var i = x; test(i, y); i += incr) {
|
|
167
|
+
var c;
|
|
168
|
+
if (isAlphaSequence) {
|
|
169
|
+
c = String.fromCharCode(i);
|
|
170
|
+
if (c === '\\')
|
|
171
|
+
c = '';
|
|
172
|
+
} else {
|
|
173
|
+
c = String(i);
|
|
174
|
+
if (pad) {
|
|
175
|
+
var need = width - c.length;
|
|
176
|
+
if (need > 0) {
|
|
177
|
+
var z = new Array(need + 1).join('0');
|
|
178
|
+
if (i < 0)
|
|
179
|
+
c = '-' + z + c.slice(1);
|
|
180
|
+
else
|
|
181
|
+
c = z + c;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
N.push(c);
|
|
186
|
+
}
|
|
187
|
+
} else {
|
|
188
|
+
N = concatMap(n, function(el) { return expand(el, false) });
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
for (var j = 0; j < N.length; j++) {
|
|
192
|
+
for (var k = 0; k < post.length; k++) {
|
|
193
|
+
var expansion = pre + N[j] + post[k];
|
|
194
|
+
if (!isTop || isSequence || expansion)
|
|
195
|
+
expansions.push(expansion);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
return expansions;
|
|
200
|
+
}
|
|
201
|
+
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "brace-expansion",
|
|
3
|
+
"description": "Brace expansion as known from sh/bash",
|
|
4
|
+
"version": "1.1.11",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git://github.com/juliangruber/brace-expansion.git"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/juliangruber/brace-expansion",
|
|
10
|
+
"main": "index.js",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"test": "tape test/*.js",
|
|
13
|
+
"gentest": "bash test/generate.sh",
|
|
14
|
+
"bench": "matcha test/perf/bench.js"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"balanced-match": "^1.0.0",
|
|
18
|
+
"concat-map": "0.0.1"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"matcha": "^0.7.0",
|
|
22
|
+
"tape": "^4.6.0"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [],
|
|
25
|
+
"author": {
|
|
26
|
+
"name": "Julian Gruber",
|
|
27
|
+
"email": "mail@juliangruber.com",
|
|
28
|
+
"url": "http://juliangruber.com"
|
|
29
|
+
},
|
|
30
|
+
"license": "MIT",
|
|
31
|
+
"testling": {
|
|
32
|
+
"files": "test/*.js",
|
|
33
|
+
"browsers": [
|
|
34
|
+
"ie/8..latest",
|
|
35
|
+
"firefox/20..latest",
|
|
36
|
+
"firefox/nightly",
|
|
37
|
+
"chrome/25..latest",
|
|
38
|
+
"chrome/canary",
|
|
39
|
+
"opera/12..latest",
|
|
40
|
+
"opera/next",
|
|
41
|
+
"safari/5.1..latest",
|
|
42
|
+
"ipad/6.0..latest",
|
|
43
|
+
"iphone/6.0..latest",
|
|
44
|
+
"android-browser/4.2..latest"
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
|
|
3
|
+
"name": "minimatch",
|
|
4
|
+
"description": "a glob matcher in javascript",
|
|
5
|
+
"version": "3.1.2",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"tag": "v3-legacy"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git://github.com/isaacs/minimatch.git"
|
|
12
|
+
},
|
|
13
|
+
"main": "minimatch.js",
|
|
14
|
+
"scripts": {
|
|
15
|
+
"test": "tap",
|
|
16
|
+
"preversion": "npm test",
|
|
17
|
+
"postversion": "npm publish",
|
|
18
|
+
"postpublish": "git push origin --all; git push origin --tags"
|
|
19
|
+
},
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": "*"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"brace-expansion": "^1.1.7"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"tap": "^15.1.6"
|
|
28
|
+
},
|
|
29
|
+
"license": "ISC",
|
|
30
|
+
"files": [
|
|
31
|
+
"minimatch.js"
|
|
32
|
+
]
|
|
33
|
+
}
|
package/package.json
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@cdktf/provider-aws": "20.1.0",
|
|
14
14
|
"@cdktf/provider-cloudinit": "11.0.0",
|
|
15
|
+
"@cdktf/provider-docker": "12.0.2",
|
|
15
16
|
"@cdktf/provider-time": "11.0.0",
|
|
16
17
|
"@cdktf/provider-tls": "11.0.0",
|
|
17
18
|
"@jsii/spec": "^1.102.0",
|
|
@@ -24,6 +25,7 @@
|
|
|
24
25
|
"cdktf": "0.21.0",
|
|
25
26
|
"commit-and-tag-version": "^12",
|
|
26
27
|
"constructs": "10.4.2",
|
|
28
|
+
"delay": "^5.0.0",
|
|
27
29
|
"eslint": "^8",
|
|
28
30
|
"eslint-config-prettier": "^9.1.0",
|
|
29
31
|
"eslint-import-resolver-typescript": "^3.6.3",
|
|
@@ -45,33 +47,40 @@
|
|
|
45
47
|
"peerDependencies": {
|
|
46
48
|
"@cdktf/provider-aws": "^20.1.0",
|
|
47
49
|
"@cdktf/provider-cloudinit": "^11.0.0",
|
|
50
|
+
"@cdktf/provider-docker": "^12.0.2",
|
|
48
51
|
"@cdktf/provider-time": "^11.0.0",
|
|
49
52
|
"@cdktf/provider-tls": "^11.0.0",
|
|
50
53
|
"cdktf": "^0.21.0",
|
|
51
54
|
"constructs": "^10.4.2"
|
|
52
55
|
},
|
|
53
56
|
"dependencies": {
|
|
57
|
+
"@balena/dockerignore": "^1.0.2",
|
|
54
58
|
"change-case": "^4.1.1",
|
|
55
59
|
"esbuild-wasm": "^0.23.1",
|
|
56
|
-
"
|
|
60
|
+
"ignore": "^5.3.2",
|
|
61
|
+
"mime-types": "^2.1.35",
|
|
62
|
+
"minimatch": "^3.1.2"
|
|
57
63
|
},
|
|
58
64
|
"bundledDependencies": [
|
|
65
|
+
"@balena/dockerignore",
|
|
59
66
|
"change-case",
|
|
60
67
|
"esbuild-wasm",
|
|
61
|
-
"
|
|
68
|
+
"ignore",
|
|
69
|
+
"mime-types",
|
|
70
|
+
"minimatch"
|
|
62
71
|
],
|
|
63
72
|
"keywords": [
|
|
64
73
|
"terraconstructs"
|
|
65
74
|
],
|
|
66
75
|
"engines": {
|
|
67
|
-
"node": ">=
|
|
76
|
+
"node": ">=20.9.0"
|
|
68
77
|
},
|
|
69
78
|
"main": "lib/index.js",
|
|
70
|
-
"license": "
|
|
79
|
+
"license": "Apache-2.0",
|
|
71
80
|
"publishConfig": {
|
|
72
81
|
"access": "public"
|
|
73
82
|
},
|
|
74
|
-
"version": "0.0
|
|
83
|
+
"version": "0.1.0",
|
|
75
84
|
"jest": {
|
|
76
85
|
"coverageProvider": "v8",
|
|
77
86
|
"setupFilesAfterEnv": [
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { TerraformAsset } from "cdktf";
|
|
2
|
-
import { Construct } from "constructs";
|
|
3
|
-
import { LambdaFunction, FunctionProps } from "./function";
|
|
4
|
-
import { IFunction } from "./function-base";
|
|
5
|
-
export interface NodejsFunctionProps extends FunctionProps {
|
|
6
|
-
/**
|
|
7
|
-
* The path to the Handler entry point script, relative to the Spec file.
|
|
8
|
-
*
|
|
9
|
-
* This script will be bundled using
|
|
10
|
-
* [esbuild-wasm](https://esbuild.github.io/getting-started/#wasm).
|
|
11
|
-
*/
|
|
12
|
-
readonly path: string;
|
|
13
|
-
/**
|
|
14
|
-
* You can mark a file or a package as external to exclude it from your
|
|
15
|
-
* build. Instead of being bundled, the import will be preserved (using
|
|
16
|
-
* require for the iife and cjs formats and using import for the esm
|
|
17
|
-
* format) and will be evaluated at run time instead.
|
|
18
|
-
*
|
|
19
|
-
* @link https://esbuild.github.io/api/#external
|
|
20
|
-
*
|
|
21
|
-
* @default []
|
|
22
|
-
*/
|
|
23
|
-
readonly external?: string[];
|
|
24
|
-
/**
|
|
25
|
-
* The NodeJS runtime for the Lambda function.
|
|
26
|
-
*
|
|
27
|
-
* @link https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported
|
|
28
|
-
*
|
|
29
|
-
* @default "nodejs20.x"
|
|
30
|
-
*/
|
|
31
|
-
readonly runtime?: "nodejs18.x" | "nodejs20.x";
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Provides a NodeJS Lambda Function. Lambda allows you to trigger execution
|
|
35
|
-
* of code in response to events in AWS, enabling serverless backend solutions.
|
|
36
|
-
*
|
|
37
|
-
* The Lambda Function itself will be bundled using
|
|
38
|
-
* [esbuild-wasm](https://esbuild.github.io/getting-started/#wasm).
|
|
39
|
-
*
|
|
40
|
-
* For example:
|
|
41
|
-
*
|
|
42
|
-
* ```ts
|
|
43
|
-
* const fn = new compute.NodejsFunction(spec, "HelloWorld", {
|
|
44
|
-
* path: path.join(__dirname, "handlers", "hello-world.ts"),
|
|
45
|
-
* });
|
|
46
|
-
* ```
|
|
47
|
-
*
|
|
48
|
-
* @resource aws_lambda_function
|
|
49
|
-
* @beacon-class compute.IFunction
|
|
50
|
-
*/
|
|
51
|
-
export declare class NodejsFunction extends LambdaFunction implements IFunction {
|
|
52
|
-
readonly asset: TerraformAsset;
|
|
53
|
-
readonly bundledPath: string;
|
|
54
|
-
constructor(scope: Construct, id: string, config: NodejsFunctionProps);
|
|
55
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var _a;
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.NodejsFunction = void 0;
|
|
5
|
-
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
|
|
6
|
-
// source: https://github.com/cdktf-plus/cdktf-plus/blob/586aabad3ab2fb2a2e93e05ed33f94474ebe9397/packages/%40cdktf-plus/aws/lib/nodejs-function/index.ts
|
|
7
|
-
const path = require("path");
|
|
8
|
-
const cdktf_1 = require("cdktf");
|
|
9
|
-
// This might be 10x slower than a native build - see https://esbuild.github.io/getting-started/#wasm
|
|
10
|
-
const esbuild_wasm_1 = require("esbuild-wasm");
|
|
11
|
-
const function_1 = require("./function");
|
|
12
|
-
const bundle = (workingDirectory, entryPoint, external) => {
|
|
13
|
-
(0, esbuild_wasm_1.buildSync)({
|
|
14
|
-
entryPoints: [entryPoint],
|
|
15
|
-
platform: "node",
|
|
16
|
-
target: "es2018",
|
|
17
|
-
bundle: true,
|
|
18
|
-
format: "cjs",
|
|
19
|
-
sourcemap: "external",
|
|
20
|
-
external,
|
|
21
|
-
outdir: "dist",
|
|
22
|
-
absWorkingDir: workingDirectory,
|
|
23
|
-
});
|
|
24
|
-
return path.join(workingDirectory, "dist");
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* Provides a NodeJS Lambda Function. Lambda allows you to trigger execution
|
|
28
|
-
* of code in response to events in AWS, enabling serverless backend solutions.
|
|
29
|
-
*
|
|
30
|
-
* The Lambda Function itself will be bundled using
|
|
31
|
-
* [esbuild-wasm](https://esbuild.github.io/getting-started/#wasm).
|
|
32
|
-
*
|
|
33
|
-
* For example:
|
|
34
|
-
*
|
|
35
|
-
* ```ts
|
|
36
|
-
* const fn = new compute.NodejsFunction(spec, "HelloWorld", {
|
|
37
|
-
* path: path.join(__dirname, "handlers", "hello-world.ts"),
|
|
38
|
-
* });
|
|
39
|
-
* ```
|
|
40
|
-
*
|
|
41
|
-
* @resource aws_lambda_function
|
|
42
|
-
* @beacon-class compute.IFunction
|
|
43
|
-
*/
|
|
44
|
-
class NodejsFunction extends function_1.LambdaFunction {
|
|
45
|
-
constructor(scope, id, config) {
|
|
46
|
-
const { path: filePath, ...rest } = config;
|
|
47
|
-
super(scope, id, rest);
|
|
48
|
-
const workingDirectory = path.resolve(path.dirname(config.path));
|
|
49
|
-
const distPath = bundle(workingDirectory, path.basename(config.path), config.external);
|
|
50
|
-
this.bundledPath = path.join(distPath, `${path.basename(config.path, ".ts")}.js`);
|
|
51
|
-
// TODO: Implement Code && Runtime
|
|
52
|
-
// https://github.com/aws/aws-cdk/blob/v2.156.0/packages/aws-cdk-lib/aws-lambda/lib/code.ts
|
|
53
|
-
this.asset = new cdktf_1.TerraformAsset(this, "NodejsAsset", {
|
|
54
|
-
path: distPath,
|
|
55
|
-
type: cdktf_1.AssetType.ARCHIVE,
|
|
56
|
-
});
|
|
57
|
-
const fileName = path.basename(config.path, ".ts");
|
|
58
|
-
this.resource.handler = `${fileName}.handler`;
|
|
59
|
-
// NOTE: for the underlaying resource, Exactly one of filename, image_uri, or s3_bucket must be specified
|
|
60
|
-
this.resource.filename = this.asset.path;
|
|
61
|
-
this.resource.sourceCodeHash = this.asset.assetHash;
|
|
62
|
-
// https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported
|
|
63
|
-
// https://docs.aws.amazon.com/lambda/latest/api/API_CreateFunction.html#lambda-CreateFunction-request-Runtime
|
|
64
|
-
this.resource.runtime = config.runtime ?? "nodejs20.x";
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
exports.NodejsFunction = NodejsFunction;
|
|
68
|
-
_a = JSII_RTTI_SYMBOL_1;
|
|
69
|
-
NodejsFunction[_a] = { fqn: "terraconstructs.aws.compute.NodejsFunction", version: "0.0.25" };
|
|
70
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnVuY3Rpb24tbm9kZWpzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2F3cy9jb21wdXRlL2Z1bmN0aW9uLW5vZGVqcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHlKQUF5SjtBQUN6Siw2QkFBNkI7QUFDN0IsaUNBQWtEO0FBRWxELHFHQUFxRztBQUNyRywrQ0FBeUM7QUFDekMseUNBQTJEO0FBZ0MzRCxNQUFNLE1BQU0sR0FBRyxDQUNiLGdCQUF3QixFQUN4QixVQUFrQixFQUNsQixRQUFtQixFQUNuQixFQUFFO0lBQ0YsSUFBQSx3QkFBUyxFQUFDO1FBQ1IsV0FBVyxFQUFFLENBQUMsVUFBVSxDQUFDO1FBQ3pCLFFBQVEsRUFBRSxNQUFNO1FBQ2hCLE1BQU0sRUFBRSxRQUFRO1FBQ2hCLE1BQU0sR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