@gradientedge/cdk-utils 4.6.2 → 4.6.6
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/app/api-destined-function/layers/nodejs/node_modules/.yarn-integrity +109 -0
- package/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/LICENSE +21 -0
- package/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/README.md +16 -0
- package/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/index.d.mts +10 -0
- package/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/index.d.ts +80 -0
- package/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/package.json +54 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/LICENSE.md +9 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/README.md +505 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/bin/uuid +2 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/index.js +9 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/md5.js +215 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/nil.js +1 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/parse.js +35 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/regex.js +1 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/rng.js +19 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/sha1.js +96 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/stringify.js +30 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v1.js +95 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v3.js +4 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v35.js +64 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v4.js +24 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v5.js +4 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/validate.js +7 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/version.js +11 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/index.js +9 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/md5.js +13 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/nil.js +1 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/parse.js +35 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/regex.js +1 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/rng.js +12 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/sha1.js +13 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/stringify.js +29 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v1.js +95 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v3.js +4 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v35.js +64 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v4.js +24 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v5.js +4 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/validate.js +7 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/version.js +11 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/index.js +79 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/md5-browser.js +223 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/md5.js +23 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/nil.js +8 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/parse.js +45 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/regex.js +8 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/rng-browser.js +26 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/rng.js +24 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/sha1-browser.js +104 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/sha1.js +23 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/stringify.js +39 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuid.min.js +1 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidNIL.min.js +1 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidParse.min.js +1 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidStringify.min.js +1 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidValidate.min.js +1 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidVersion.min.js +1 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidv1.min.js +1 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidv3.min.js +1 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidv4.min.js +1 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidv5.min.js +1 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/uuid-bin.js +85 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v1.js +107 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v3.js +16 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v35.js +78 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v4.js +37 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v5.js +16 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/validate.js +17 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/version.js +21 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/package.json +135 -0
- package/app/api-destined-function/layers/nodejs/node_modules/uuid/wrapper.mjs +10 -0
- package/app/api-destined-function/layers/nodejs/package.json +29 -0
- package/dist/app/api-destined-function/src/lib/lambda.d.ts +0 -1
- package/dist/app/api-destined-function/src/lib/lambda.js +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/src/lib/common/construct.d.ts +0 -1
- package/dist/src/lib/common/construct.js +0 -1
- package/dist/src/lib/common/index.d.ts +0 -1
- package/dist/src/lib/common/index.js +0 -1
- package/dist/src/lib/common/stack.d.ts +0 -1
- package/dist/src/lib/common/stack.js +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.d.ts +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.js +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.d.ts +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.js +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.d.ts +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.js +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/index.d.ts +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/index.js +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/main.js +51 -12
- package/dist/src/lib/construct/graphql-api-lambda/index.d.ts +0 -1
- package/dist/src/lib/construct/graphql-api-lambda/index.js +0 -1
- package/dist/src/lib/construct/graphql-api-lambda/main.d.ts +0 -1
- package/dist/src/lib/construct/graphql-api-lambda/main.js +0 -1
- package/dist/src/lib/construct/graphql-api-lambda-with-cache/index.d.ts +0 -1
- package/dist/src/lib/construct/graphql-api-lambda-with-cache/index.js +0 -1
- package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.d.ts +0 -1
- package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.js +0 -1
- package/dist/src/lib/construct/index.d.ts +0 -1
- package/dist/src/lib/construct/index.js +0 -1
- package/dist/src/lib/construct/site-with-ecs-backend/index.d.ts +0 -1
- package/dist/src/lib/construct/site-with-ecs-backend/index.js +0 -1
- package/dist/src/lib/construct/site-with-ecs-backend/main.d.ts +0 -1
- package/dist/src/lib/construct/site-with-ecs-backend/main.js +0 -1
- package/dist/src/lib/construct/static-site/index.d.ts +0 -1
- package/dist/src/lib/construct/static-site/index.js +0 -1
- package/dist/src/lib/construct/static-site/main.d.ts +0 -1
- package/dist/src/lib/construct/static-site/main.js +0 -1
- package/dist/src/lib/manager/aws/acm-manager.d.ts +0 -1
- package/dist/src/lib/manager/aws/acm-manager.js +0 -1
- package/dist/src/lib/manager/aws/api-manager.d.ts +0 -1
- package/dist/src/lib/manager/aws/api-manager.js +0 -1
- package/dist/src/lib/manager/aws/app-config-manager.d.ts +0 -1
- package/dist/src/lib/manager/aws/app-config-manager.js +0 -1
- package/dist/src/lib/manager/aws/cloudfront-manager.d.ts +0 -1
- package/dist/src/lib/manager/aws/cloudfront-manager.js +0 -1
- package/dist/src/lib/manager/aws/cloudtrail-manager.d.ts +0 -1
- package/dist/src/lib/manager/aws/cloudtrail-manager.js +0 -1
- package/dist/src/lib/manager/aws/cloudwatch-manager.d.ts +0 -1
- package/dist/src/lib/manager/aws/cloudwatch-manager.js +0 -1
- package/dist/src/lib/manager/aws/codebuild-manager.d.ts +0 -1
- package/dist/src/lib/manager/aws/codebuild-manager.js +0 -1
- package/dist/src/lib/manager/aws/dynamodb-manager.d.ts +0 -1
- package/dist/src/lib/manager/aws/dynamodb-manager.js +0 -1
- package/dist/src/lib/manager/aws/ecr-manager.d.ts +0 -1
- package/dist/src/lib/manager/aws/ecr-manager.js +0 -1
- package/dist/src/lib/manager/aws/ecs-manager.d.ts +0 -1
- package/dist/src/lib/manager/aws/ecs-manager.js +0 -1
- package/dist/src/lib/manager/aws/eks-manager.d.ts +0 -1
- package/dist/src/lib/manager/aws/eks-manager.js +0 -1
- package/dist/src/lib/manager/aws/elasticache-manager.d.ts +0 -1
- package/dist/src/lib/manager/aws/elasticache-manager.js +0 -1
- package/dist/src/lib/manager/aws/event-manager.d.ts +0 -1
- package/dist/src/lib/manager/aws/event-manager.js +0 -1
- package/dist/src/lib/manager/aws/iam-manager.d.ts +0 -1
- package/dist/src/lib/manager/aws/iam-manager.js +0 -1
- package/dist/src/lib/manager/aws/index.d.ts +0 -1
- package/dist/src/lib/manager/aws/index.js +0 -1
- package/dist/src/lib/manager/aws/lambda-manager.d.ts +0 -1
- package/dist/src/lib/manager/aws/lambda-manager.js +0 -1
- package/dist/src/lib/manager/aws/log-manager.d.ts +0 -1
- package/dist/src/lib/manager/aws/log-manager.js +0 -1
- package/dist/src/lib/manager/aws/route53-manager.d.ts +0 -1
- package/dist/src/lib/manager/aws/route53-manager.js +0 -1
- package/dist/src/lib/manager/aws/s3-manager.d.ts +0 -1
- package/dist/src/lib/manager/aws/s3-manager.js +0 -1
- package/dist/src/lib/manager/aws/secrets-manager.d.ts +0 -1
- package/dist/src/lib/manager/aws/secrets-manager.js +0 -1
- package/dist/src/lib/manager/aws/sns-manager.d.ts +0 -1
- package/dist/src/lib/manager/aws/sns-manager.js +0 -1
- package/dist/src/lib/manager/aws/ssm-manager.d.ts +0 -1
- package/dist/src/lib/manager/aws/ssm-manager.js +0 -1
- package/dist/src/lib/manager/aws/vpc-manager.d.ts +0 -1
- package/dist/src/lib/manager/aws/vpc-manager.js +0 -1
- package/dist/src/lib/manager/aws/waf-manager.d.ts +0 -1
- package/dist/src/lib/manager/aws/waf-manager.js +0 -1
- package/dist/src/lib/manager/index.d.ts +0 -1
- package/dist/src/lib/manager/index.js +0 -1
- package/dist/src/lib/types/aws/index.d.ts +4 -4
- package/dist/src/lib/types/aws/index.js +0 -1
- package/dist/src/lib/types/index.d.ts +0 -1
- package/dist/src/lib/types/index.js +0 -1
- package/dist/src/lib/utils/aws/index.d.ts +0 -1
- package/dist/src/lib/utils/aws/index.js +0 -1
- package/dist/src/lib/utils/index.d.ts +0 -1
- package/dist/src/lib/utils/index.js +0 -1
- package/package.json +2 -1
- package/src/lib/construct/api-to-eventbridge-target/main.ts +57 -27
- package/src/lib/types/aws/index.ts +4 -3
- package/tsconfig.prd.json +8 -0
- package/dist/app/api-destined-function/src/lib/lambda.d.ts.map +0 -1
- package/dist/app/api-destined-function/src/lib/lambda.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/src/lib/common/construct.d.ts.map +0 -1
- package/dist/src/lib/common/construct.js.map +0 -1
- package/dist/src/lib/common/index.d.ts.map +0 -1
- package/dist/src/lib/common/index.js.map +0 -1
- package/dist/src/lib/common/stack.d.ts.map +0 -1
- package/dist/src/lib/common/stack.js.map +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.d.ts.map +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.js.map +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.d.ts.map +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.js.map +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.d.ts.map +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.js.map +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/index.d.ts.map +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/index.js.map +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts.map +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/main.js.map +0 -1
- package/dist/src/lib/construct/graphql-api-lambda/index.d.ts.map +0 -1
- package/dist/src/lib/construct/graphql-api-lambda/index.js.map +0 -1
- package/dist/src/lib/construct/graphql-api-lambda/main.d.ts.map +0 -1
- package/dist/src/lib/construct/graphql-api-lambda/main.js.map +0 -1
- package/dist/src/lib/construct/graphql-api-lambda-with-cache/index.d.ts.map +0 -1
- package/dist/src/lib/construct/graphql-api-lambda-with-cache/index.js.map +0 -1
- package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.d.ts.map +0 -1
- package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.js.map +0 -1
- package/dist/src/lib/construct/index.d.ts.map +0 -1
- package/dist/src/lib/construct/index.js.map +0 -1
- package/dist/src/lib/construct/site-with-ecs-backend/index.d.ts.map +0 -1
- package/dist/src/lib/construct/site-with-ecs-backend/index.js.map +0 -1
- package/dist/src/lib/construct/site-with-ecs-backend/main.d.ts.map +0 -1
- package/dist/src/lib/construct/site-with-ecs-backend/main.js.map +0 -1
- package/dist/src/lib/construct/static-site/index.d.ts.map +0 -1
- package/dist/src/lib/construct/static-site/index.js.map +0 -1
- package/dist/src/lib/construct/static-site/main.d.ts.map +0 -1
- package/dist/src/lib/construct/static-site/main.js.map +0 -1
- package/dist/src/lib/manager/aws/acm-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/acm-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/api-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/api-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/app-config-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/app-config-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/cloudfront-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/cloudfront-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/cloudtrail-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/cloudtrail-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/cloudwatch-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/cloudwatch-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/codebuild-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/codebuild-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/dynamodb-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/dynamodb-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/ecr-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/ecr-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/ecs-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/ecs-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/eks-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/eks-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/elasticache-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/elasticache-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/event-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/event-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/iam-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/iam-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/index.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/index.js.map +0 -1
- package/dist/src/lib/manager/aws/lambda-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/lambda-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/log-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/log-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/route53-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/route53-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/s3-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/s3-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/secrets-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/secrets-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/sns-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/sns-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/ssm-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/ssm-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/vpc-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/vpc-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/waf-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/waf-manager.js.map +0 -1
- package/dist/src/lib/manager/index.d.ts.map +0 -1
- package/dist/src/lib/manager/index.js.map +0 -1
- package/dist/src/lib/types/aws/index.d.ts.map +0 -1
- package/dist/src/lib/types/aws/index.js.map +0 -1
- package/dist/src/lib/types/index.d.ts.map +0 -1
- package/dist/src/lib/types/index.js.map +0 -1
- package/dist/src/lib/utils/aws/index.d.ts.map +0 -1
- package/dist/src/lib/utils/aws/index.js.map +0 -1
- package/dist/src/lib/utils/index.d.ts.map +0 -1
- package/dist/src/lib/utils/index.js.map +0 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _rng = _interopRequireDefault(require("./rng.js"));
|
|
9
|
+
|
|
10
|
+
var _stringify = _interopRequireDefault(require("./stringify.js"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
function v4(options, buf, offset) {
|
|
15
|
+
options = options || {};
|
|
16
|
+
|
|
17
|
+
const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
21
|
+
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
22
|
+
|
|
23
|
+
if (buf) {
|
|
24
|
+
offset = offset || 0;
|
|
25
|
+
|
|
26
|
+
for (let i = 0; i < 16; ++i) {
|
|
27
|
+
buf[offset + i] = rnds[i];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return buf;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return (0, _stringify.default)(rnds);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var _default = v4;
|
|
37
|
+
exports.default = _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _v = _interopRequireDefault(require("./v35.js"));
|
|
9
|
+
|
|
10
|
+
var _sha = _interopRequireDefault(require("./sha1.js"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
const v5 = (0, _v.default)('v5', 0x50, _sha.default);
|
|
15
|
+
var _default = v5;
|
|
16
|
+
exports.default = _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _regex = _interopRequireDefault(require("./regex.js"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
function validate(uuid) {
|
|
13
|
+
return typeof uuid === 'string' && _regex.default.test(uuid);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
var _default = validate;
|
|
17
|
+
exports.default = _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _validate = _interopRequireDefault(require("./validate.js"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
function version(uuid) {
|
|
13
|
+
if (!(0, _validate.default)(uuid)) {
|
|
14
|
+
throw TypeError('Invalid UUID');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return parseInt(uuid.substr(14, 1), 16);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
var _default = version;
|
|
21
|
+
exports.default = _default;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "uuid",
|
|
3
|
+
"version": "8.3.2",
|
|
4
|
+
"description": "RFC4122 (v1, v4, and v5) UUIDs",
|
|
5
|
+
"commitlint": {
|
|
6
|
+
"extends": [
|
|
7
|
+
"@commitlint/config-conventional"
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
"keywords": [
|
|
11
|
+
"uuid",
|
|
12
|
+
"guid",
|
|
13
|
+
"rfc4122"
|
|
14
|
+
],
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"bin": {
|
|
17
|
+
"uuid": "./dist/bin/uuid"
|
|
18
|
+
},
|
|
19
|
+
"sideEffects": false,
|
|
20
|
+
"main": "./dist/index.js",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"node": {
|
|
24
|
+
"module": "./dist/esm-node/index.js",
|
|
25
|
+
"require": "./dist/index.js",
|
|
26
|
+
"import": "./wrapper.mjs"
|
|
27
|
+
},
|
|
28
|
+
"default": "./dist/esm-browser/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./package.json": "./package.json"
|
|
31
|
+
},
|
|
32
|
+
"module": "./dist/esm-node/index.js",
|
|
33
|
+
"browser": {
|
|
34
|
+
"./dist/md5.js": "./dist/md5-browser.js",
|
|
35
|
+
"./dist/rng.js": "./dist/rng-browser.js",
|
|
36
|
+
"./dist/sha1.js": "./dist/sha1-browser.js",
|
|
37
|
+
"./dist/esm-node/index.js": "./dist/esm-browser/index.js"
|
|
38
|
+
},
|
|
39
|
+
"files": [
|
|
40
|
+
"CHANGELOG.md",
|
|
41
|
+
"CONTRIBUTING.md",
|
|
42
|
+
"LICENSE.md",
|
|
43
|
+
"README.md",
|
|
44
|
+
"dist",
|
|
45
|
+
"wrapper.mjs"
|
|
46
|
+
],
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@babel/cli": "7.11.6",
|
|
49
|
+
"@babel/core": "7.11.6",
|
|
50
|
+
"@babel/preset-env": "7.11.5",
|
|
51
|
+
"@commitlint/cli": "11.0.0",
|
|
52
|
+
"@commitlint/config-conventional": "11.0.0",
|
|
53
|
+
"@rollup/plugin-node-resolve": "9.0.0",
|
|
54
|
+
"babel-eslint": "10.1.0",
|
|
55
|
+
"bundlewatch": "0.3.1",
|
|
56
|
+
"eslint": "7.10.0",
|
|
57
|
+
"eslint-config-prettier": "6.12.0",
|
|
58
|
+
"eslint-config-standard": "14.1.1",
|
|
59
|
+
"eslint-plugin-import": "2.22.1",
|
|
60
|
+
"eslint-plugin-node": "11.1.0",
|
|
61
|
+
"eslint-plugin-prettier": "3.1.4",
|
|
62
|
+
"eslint-plugin-promise": "4.2.1",
|
|
63
|
+
"eslint-plugin-standard": "4.0.1",
|
|
64
|
+
"husky": "4.3.0",
|
|
65
|
+
"jest": "25.5.4",
|
|
66
|
+
"lint-staged": "10.4.0",
|
|
67
|
+
"npm-run-all": "4.1.5",
|
|
68
|
+
"optional-dev-dependency": "2.0.1",
|
|
69
|
+
"prettier": "2.1.2",
|
|
70
|
+
"random-seed": "0.3.0",
|
|
71
|
+
"rollup": "2.28.2",
|
|
72
|
+
"rollup-plugin-terser": "7.0.2",
|
|
73
|
+
"runmd": "1.3.2",
|
|
74
|
+
"standard-version": "9.0.0"
|
|
75
|
+
},
|
|
76
|
+
"optionalDevDependencies": {
|
|
77
|
+
"@wdio/browserstack-service": "6.4.0",
|
|
78
|
+
"@wdio/cli": "6.4.0",
|
|
79
|
+
"@wdio/jasmine-framework": "6.4.0",
|
|
80
|
+
"@wdio/local-runner": "6.4.0",
|
|
81
|
+
"@wdio/spec-reporter": "6.4.0",
|
|
82
|
+
"@wdio/static-server-service": "6.4.0",
|
|
83
|
+
"@wdio/sync": "6.4.0"
|
|
84
|
+
},
|
|
85
|
+
"scripts": {
|
|
86
|
+
"examples:browser:webpack:build": "cd examples/browser-webpack && npm install && npm run build",
|
|
87
|
+
"examples:browser:rollup:build": "cd examples/browser-rollup && npm install && npm run build",
|
|
88
|
+
"examples:node:commonjs:test": "cd examples/node-commonjs && npm install && npm test",
|
|
89
|
+
"examples:node:esmodules:test": "cd examples/node-esmodules && npm install && npm test",
|
|
90
|
+
"lint": "npm run eslint:check && npm run prettier:check",
|
|
91
|
+
"eslint:check": "eslint src/ test/ examples/ *.js",
|
|
92
|
+
"eslint:fix": "eslint --fix src/ test/ examples/ *.js",
|
|
93
|
+
"pretest": "[ -n $CI ] || npm run build",
|
|
94
|
+
"test": "BABEL_ENV=commonjs node --throw-deprecation node_modules/.bin/jest test/unit/",
|
|
95
|
+
"pretest:browser": "optional-dev-dependency && npm run build && npm-run-all --parallel examples:browser:**",
|
|
96
|
+
"test:browser": "wdio run ./wdio.conf.js",
|
|
97
|
+
"pretest:node": "npm run build",
|
|
98
|
+
"test:node": "npm-run-all --parallel examples:node:**",
|
|
99
|
+
"test:pack": "./scripts/testpack.sh",
|
|
100
|
+
"pretest:benchmark": "npm run build",
|
|
101
|
+
"test:benchmark": "cd examples/benchmark && npm install && npm test",
|
|
102
|
+
"prettier:check": "prettier --ignore-path .prettierignore --check '**/*.{js,jsx,json,md}'",
|
|
103
|
+
"prettier:fix": "prettier --ignore-path .prettierignore --write '**/*.{js,jsx,json,md}'",
|
|
104
|
+
"bundlewatch": "npm run pretest:browser && bundlewatch --config bundlewatch.config.json",
|
|
105
|
+
"md": "runmd --watch --output=README.md README_js.md",
|
|
106
|
+
"docs": "( node --version | grep -q 'v12' ) && ( npm run build && runmd --output=README.md README_js.md )",
|
|
107
|
+
"docs:diff": "npm run docs && git diff --quiet README.md",
|
|
108
|
+
"build": "./scripts/build.sh",
|
|
109
|
+
"prepack": "npm run build",
|
|
110
|
+
"release": "standard-version --no-verify"
|
|
111
|
+
},
|
|
112
|
+
"repository": {
|
|
113
|
+
"type": "git",
|
|
114
|
+
"url": "https://github.com/uuidjs/uuid.git"
|
|
115
|
+
},
|
|
116
|
+
"husky": {
|
|
117
|
+
"hooks": {
|
|
118
|
+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
|
|
119
|
+
"pre-commit": "lint-staged"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"lint-staged": {
|
|
123
|
+
"*.{js,jsx,json,md}": [
|
|
124
|
+
"prettier --write"
|
|
125
|
+
],
|
|
126
|
+
"*.{js,jsx}": [
|
|
127
|
+
"eslint --fix"
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
"standard-version": {
|
|
131
|
+
"scripts": {
|
|
132
|
+
"postchangelog": "prettier --write CHANGELOG.md"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import uuid from './dist/index.js';
|
|
2
|
+
export const v1 = uuid.v1;
|
|
3
|
+
export const v3 = uuid.v3;
|
|
4
|
+
export const v4 = uuid.v4;
|
|
5
|
+
export const v5 = uuid.v5;
|
|
6
|
+
export const NIL = uuid.NIL;
|
|
7
|
+
export const version = uuid.version;
|
|
8
|
+
export const validate = uuid.validate;
|
|
9
|
+
export const stringify = uuid.stringify;
|
|
10
|
+
export const parse = uuid.parse;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@gradientedge/cdk-utils-api-destined-function",
|
|
3
|
+
"version": "0.0.0-SNAPSHOT",
|
|
4
|
+
"description": "Application for API Destined Function",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"license": "UNLICENSED",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=14.16.0 <15"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/gradientedge/cdk-utils.git"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "yarn package:function",
|
|
16
|
+
"init": "yarn install",
|
|
17
|
+
"package:function": "mkdirp layers/nodejs && cp -R package.json layers/nodejs && cd layers/nodejs && yarn install --production --no-lockfile",
|
|
18
|
+
"start": "node dist/index",
|
|
19
|
+
"test": "npx jest --ci --runInBand --passWithNoTests"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@types/uuid": "^8.3.4",
|
|
23
|
+
"uuid": "^8.3.2"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"mkdirp": "^1.0.4",
|
|
27
|
+
"rimraf": "^3.0.2"
|
|
28
|
+
}
|
|
29
|
+
}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -12,4 +12,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
__exportStar(require("./construct"), exports);
|
|
14
14
|
__exportStar(require("./stack"), exports);
|
|
15
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -20,10 +20,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
exports.ApiToEventBridgeTarget = void 0;
|
|
23
|
+
const cdk = __importStar(require("aws-cdk-lib"));
|
|
23
24
|
const apig = __importStar(require("aws-cdk-lib/aws-apigateway"));
|
|
24
25
|
const eventstargets = __importStar(require("aws-cdk-lib/aws-events-targets"));
|
|
25
26
|
const iam = __importStar(require("aws-cdk-lib/aws-iam"));
|
|
26
27
|
const destinations = __importStar(require("aws-cdk-lib/aws-lambda-destinations"));
|
|
28
|
+
const sns = __importStar(require("aws-cdk-lib/aws-sns"));
|
|
27
29
|
const common_1 = require("../../common");
|
|
28
30
|
const api_destination_event_1 = require("./api-destination-event");
|
|
29
31
|
const api_destined_lambda_1 = require("./api-destined-lambda");
|
|
@@ -131,6 +133,8 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
|
|
|
131
133
|
* @protected
|
|
132
134
|
*/
|
|
133
135
|
resolveCertificate() {
|
|
136
|
+
if (this.props.api.useExisting)
|
|
137
|
+
return;
|
|
134
138
|
if (this.props.api.certificate.useExistingCertificate &&
|
|
135
139
|
this.props.api.certificate.certificateSsmName &&
|
|
136
140
|
this.props.api.certificate.certificateRegion) {
|
|
@@ -143,6 +147,8 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
|
|
|
143
147
|
* @protected
|
|
144
148
|
*/
|
|
145
149
|
createApiDestinedLambdaPolicy() {
|
|
150
|
+
if (this.props.api.useExisting)
|
|
151
|
+
return;
|
|
146
152
|
this.apiDestinedLambda.policy = new iam.PolicyDocument({
|
|
147
153
|
statements: [this.iamManager.statementForReadSecrets(this), this.iamManager.statementForPutEvents()],
|
|
148
154
|
});
|
|
@@ -152,6 +158,8 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
|
|
|
152
158
|
* @protected
|
|
153
159
|
*/
|
|
154
160
|
createApiDestinedLambdaRole() {
|
|
161
|
+
if (this.props.api.useExisting)
|
|
162
|
+
return;
|
|
155
163
|
this.apiDestinedLambda.role = this.iamManager.createRoleForLambda(`${this.id}-lambda-destined-role`, this, this.apiDestinedLambda.policy);
|
|
156
164
|
}
|
|
157
165
|
/**
|
|
@@ -159,6 +167,8 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
|
|
|
159
167
|
* @protected
|
|
160
168
|
*/
|
|
161
169
|
createApiDestinedLambdaEnvironment() {
|
|
170
|
+
if (this.props.api.useExisting)
|
|
171
|
+
return;
|
|
162
172
|
this.apiDestinedLambda.environment = {
|
|
163
173
|
NODE_ENV: this.props.nodeEnv,
|
|
164
174
|
LOG_LEVEL: this.props.logLevel,
|
|
@@ -171,6 +181,8 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
|
|
|
171
181
|
* @protected
|
|
172
182
|
*/
|
|
173
183
|
createApiDestinedLambdaLayers() {
|
|
184
|
+
if (this.props.api.useExisting)
|
|
185
|
+
return;
|
|
174
186
|
const layers = [];
|
|
175
187
|
if (this.props.lambda.layerSource) {
|
|
176
188
|
layers.push(this.lambdaManager.createLambdaLayer(`${this.id}-lambda-destined-layer`, this, this.props.lambda.layerSource));
|
|
@@ -182,6 +194,8 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
|
|
|
182
194
|
* @protected
|
|
183
195
|
*/
|
|
184
196
|
createApiDestinedLambdaDestinations() {
|
|
197
|
+
if (this.props.api.useExisting)
|
|
198
|
+
return;
|
|
185
199
|
this.apiDestinedLambda.destinationSuccess = new destinations.EventBridgeDestination(this.apiEvent.eventBus);
|
|
186
200
|
this.apiDestinedLambda.destinationFailure = new destinations.EventBridgeDestination(this.apiEvent.eventBus);
|
|
187
201
|
}
|
|
@@ -190,6 +204,8 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
|
|
|
190
204
|
* @protected
|
|
191
205
|
*/
|
|
192
206
|
createApiDestinedLambdaFunction() {
|
|
207
|
+
if (this.props.api.useExisting)
|
|
208
|
+
return;
|
|
193
209
|
if (!this.props.lambda.source)
|
|
194
210
|
throw 'Api Destined Lambda props undefined';
|
|
195
211
|
this.apiDestinedLambda.function = this.lambdaManager.createLambdaFunction(`${this.id}-lambda-destined`, this, {
|
|
@@ -201,11 +217,15 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
|
|
|
201
217
|
}, this.apiDestinedLambda.role, this.apiDestinedLambda.layers, this.props.lambda.source, this.props.lambda.handler ?? 'lambda.handler', this.apiDestinedLambda.environment);
|
|
202
218
|
}
|
|
203
219
|
createApiDestinedEventBus() {
|
|
220
|
+
if (this.props.api.useExisting)
|
|
221
|
+
return;
|
|
204
222
|
this.apiEvent.eventBus = this.eventManager.createEventBus(`${this.id}-destined-event-bus`, this, {
|
|
205
223
|
eventBusName: `${this.props.event.eventBusName}`,
|
|
206
224
|
});
|
|
207
225
|
}
|
|
208
226
|
createApiDestinationLogGroupSuccess() {
|
|
227
|
+
if (this.props.api.useExisting)
|
|
228
|
+
return;
|
|
209
229
|
this.apiEvent.logGroupSuccess = this.logManager.createLogGroup(`${this.id}-destination-success-log`, this, {
|
|
210
230
|
...{
|
|
211
231
|
logGroupName: `/${this.id}/events/api-destination-success`,
|
|
@@ -218,6 +238,8 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
|
|
|
218
238
|
* @protected
|
|
219
239
|
*/
|
|
220
240
|
createApiDestinationRuleSuccess() {
|
|
241
|
+
if (this.props.api.useExisting)
|
|
242
|
+
return;
|
|
221
243
|
this.props.event.ruleSuccess = {
|
|
222
244
|
...{
|
|
223
245
|
ruleName: `${this.id}-api-destination-success`,
|
|
@@ -238,6 +260,8 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
|
|
|
238
260
|
this.apiEvent.ruleSuccess = this.eventManager.createRule(`${this.id}-api-destination-rule-success`, this, this.props.event.ruleSuccess, this.apiEvent.eventBus, [new eventstargets.CloudWatchLogGroup(this.apiEvent.logGroupSuccess)]);
|
|
239
261
|
}
|
|
240
262
|
createApiDestinationLogGroupFailure() {
|
|
263
|
+
if (this.props.api.useExisting)
|
|
264
|
+
return;
|
|
241
265
|
this.apiEvent.logGroupFailure = this.logManager.createLogGroup(`${this.id}-destination-failure-log`, this, {
|
|
242
266
|
...{
|
|
243
267
|
logGroupName: `/${this.id}/events/api-destination-failure`,
|
|
@@ -250,6 +274,8 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
|
|
|
250
274
|
* @protected
|
|
251
275
|
*/
|
|
252
276
|
createApiDestinationRuleFailure() {
|
|
277
|
+
if (this.props.api.useExisting)
|
|
278
|
+
return;
|
|
253
279
|
this.props.event.ruleFailure = {
|
|
254
280
|
...{
|
|
255
281
|
ruleName: `${this.id}-api-destination-failure`,
|
|
@@ -266,11 +292,16 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
|
|
|
266
292
|
this.apiEvent.ruleFailure = this.eventManager.createRule(`${this.id}-api-destination-rule-failure`, this, this.props.event.ruleFailure, this.apiEvent.eventBus, [new eventstargets.CloudWatchLogGroup(this.apiEvent.logGroupFailure)]);
|
|
267
293
|
}
|
|
268
294
|
createApiDestinedTopicRole() {
|
|
295
|
+
if (this.props.api.useExisting)
|
|
296
|
+
return;
|
|
269
297
|
this.apiDestinedRestApi.topicRole = new iam.Role(this, `${this.id}-sns-rest-api-role`, {
|
|
270
298
|
assumedBy: new iam.ServicePrincipal('apigateway.amazonaws.com'),
|
|
271
299
|
});
|
|
272
300
|
}
|
|
273
301
|
createApiDestinedTopic() {
|
|
302
|
+
if (this.props.api.useExisting) {
|
|
303
|
+
this.apiDestinedRestApi.topic = sns.Topic.fromTopicArn(this, `${this.id}-destined-topic`, `arn:aws:sns:${this.props.region}:${cdk.Stack.of(this).account}:${this.id}-destined-topic-${this.props.stage}`);
|
|
304
|
+
}
|
|
274
305
|
this.apiDestinedRestApi.topic = this.snsManager.createLambdaNotificationService(`${this.id}-destined-topic`, this, {
|
|
275
306
|
topicName: `${this.id}-destined-topic`,
|
|
276
307
|
}, this.apiDestinedLambda.function);
|
|
@@ -281,6 +312,9 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
|
|
|
281
312
|
* @protected
|
|
282
313
|
*/
|
|
283
314
|
createApiDestinedRestApi() {
|
|
315
|
+
if (this.props.api.useExisting) {
|
|
316
|
+
this.apiDestinedRestApi.api = apig.RestApi.fromRestApiId(this, `${this.id}-sns-rest-api`, cdk.Fn.importValue('importedRestApiRef'));
|
|
317
|
+
}
|
|
284
318
|
this.apiDestinedRestApi.api = new apig.RestApi(this, `${this.id}-sns-rest-api`, {
|
|
285
319
|
...{
|
|
286
320
|
deployOptions: {
|
|
@@ -302,8 +336,11 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
|
|
|
302
336
|
},
|
|
303
337
|
...this.props.api,
|
|
304
338
|
});
|
|
339
|
+
this.addCfnOutput(`${this.id}-restApiId`, this.apiDestinedRestApi.api.restApiId);
|
|
305
340
|
}
|
|
306
341
|
createApiDestinedResponseModel() {
|
|
342
|
+
if (this.props.api.useExisting)
|
|
343
|
+
return;
|
|
307
344
|
this.apiDestinedRestApi.responseModel = this.apiDestinedRestApi.api.addModel(`${this.id}-response-model`, {
|
|
308
345
|
...{
|
|
309
346
|
contentType: 'application/json',
|
|
@@ -319,6 +356,8 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
|
|
|
319
356
|
});
|
|
320
357
|
}
|
|
321
358
|
createApiDestinedErrorResponseModel() {
|
|
359
|
+
if (this.props.api.useExisting)
|
|
360
|
+
return;
|
|
322
361
|
this.apiDestinedRestApi.errorResponseModel = this.apiDestinedRestApi.api.addModel(`${this.id}-error-response-model`, {
|
|
323
362
|
...{
|
|
324
363
|
contentType: 'application/json',
|
|
@@ -465,6 +504,8 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
|
|
|
465
504
|
* @protected
|
|
466
505
|
*/
|
|
467
506
|
createApiDomain() {
|
|
507
|
+
if (this.props.api.useExisting)
|
|
508
|
+
return;
|
|
468
509
|
this.apiDestinedRestApi.domain = this.apiManager.createApiDomain(`${this.id}-api-domain`, this, this.isProductionStage()
|
|
469
510
|
? `${this.props.apiSubDomain}.${this.fullyQualifiedDomainName}`
|
|
470
511
|
: `${this.props.apiSubDomain}-${this.props.stage}.${this.fullyQualifiedDomainName}`, this.apiDestinedRestApi.certificate);
|
|
@@ -474,25 +515,23 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
|
|
|
474
515
|
* @protected
|
|
475
516
|
*/
|
|
476
517
|
createApiBasePathMapping() {
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
}));
|
|
486
|
-
});
|
|
487
|
-
}
|
|
518
|
+
if (this.props.api.useExisting)
|
|
519
|
+
return;
|
|
520
|
+
new apig.BasePathMapping(this, `${this.id}-base-bath-mapping`, {
|
|
521
|
+
basePath: '',
|
|
522
|
+
domainName: this.apiDestinedRestApi.domain,
|
|
523
|
+
restApi: this.apiDestinedRestApi.api,
|
|
524
|
+
stage: this.apiDestinedRestApi.api.deploymentStage,
|
|
525
|
+
});
|
|
488
526
|
}
|
|
489
527
|
/**
|
|
490
528
|
* @summary Method to create route53 records for Api API
|
|
491
529
|
* @protected
|
|
492
530
|
*/
|
|
493
531
|
createApiRouteAssets() {
|
|
532
|
+
if (this.props.api.useExisting)
|
|
533
|
+
return;
|
|
494
534
|
this.route53Manager.createApiGatewayARecord(`${this.id}-custom-domain-a-record`, this, this.props.apiSubDomain, this.apiDestinedRestApi.domain, this.apiDestinedRestApi.hostedZone);
|
|
495
535
|
}
|
|
496
536
|
}
|
|
497
537
|
exports.ApiToEventBridgeTarget = ApiToEventBridgeTarget;
|
|
498
|
-
//# sourceMappingURL=main.js.map
|