@openhi/constructs 0.0.31 → 0.0.33
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/lib/index.d.mts +12 -29
- package/lib/index.d.ts +12 -29
- package/lib/index.js +6 -22
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +6 -23
- package/lib/index.mjs.map +1 -1
- package/lib/rest-api-lambda.handler.js +1818 -504
- package/lib/rest-api-lambda.handler.js.map +1 -1
- package/lib/rest-api-lambda.handler.mjs +1818 -504
- package/lib/rest-api-lambda.handler.mjs.map +1 -1
- package/package.json +4 -4
package/lib/index.mjs
CHANGED
|
@@ -1124,7 +1124,6 @@ var OpenHiGlobalService = _OpenHiGlobalService;
|
|
|
1124
1124
|
|
|
1125
1125
|
// src/services/open-hi-rest-api-service.ts
|
|
1126
1126
|
import {
|
|
1127
|
-
CorsHttpMethod,
|
|
1128
1127
|
DomainName,
|
|
1129
1128
|
HttpApi as HttpApi2,
|
|
1130
1129
|
HttpMethod,
|
|
@@ -1141,7 +1140,6 @@ import {
|
|
|
1141
1140
|
RecordTarget
|
|
1142
1141
|
} from "aws-cdk-lib/aws-route53";
|
|
1143
1142
|
import { ApiGatewayv2DomainProperties } from "aws-cdk-lib/aws-route53-targets";
|
|
1144
|
-
import { Duration as Duration3 } from "aws-cdk-lib/core";
|
|
1145
1143
|
|
|
1146
1144
|
// src/services/open-hi-data-service.ts
|
|
1147
1145
|
import { Table as Table2 } from "aws-cdk-lib/aws-dynamodb";
|
|
@@ -1260,6 +1258,10 @@ var RestApiLambda = class extends Construct5 {
|
|
|
1260
1258
|
DYNAMO_TABLE_NAME: props.dynamoTableName,
|
|
1261
1259
|
BRANCH_TAG_VALUE: props.branchTagValue,
|
|
1262
1260
|
HTTP_API_TAG_VALUE: props.httpApiTagValue
|
|
1261
|
+
},
|
|
1262
|
+
bundling: {
|
|
1263
|
+
minify: true,
|
|
1264
|
+
sourceMap: false
|
|
1263
1265
|
}
|
|
1264
1266
|
});
|
|
1265
1267
|
}
|
|
@@ -1463,32 +1465,13 @@ var _OpenHiRestApiService = class _OpenHiRestApiService extends OpenHiService {
|
|
|
1463
1465
|
userPool,
|
|
1464
1466
|
{ userPoolClients: [userPoolClient] }
|
|
1465
1467
|
);
|
|
1466
|
-
const cors = this.props.cors;
|
|
1467
|
-
const corsPreflight = cors && cors.allowOrigins.length > 0 ? {
|
|
1468
|
-
allowOrigins: cors.allowOrigins,
|
|
1469
|
-
allowMethods: cors.allowMethods ?? [
|
|
1470
|
-
CorsHttpMethod.GET,
|
|
1471
|
-
CorsHttpMethod.HEAD,
|
|
1472
|
-
CorsHttpMethod.POST,
|
|
1473
|
-
CorsHttpMethod.PUT,
|
|
1474
|
-
CorsHttpMethod.PATCH,
|
|
1475
|
-
CorsHttpMethod.DELETE,
|
|
1476
|
-
CorsHttpMethod.OPTIONS
|
|
1477
|
-
],
|
|
1478
|
-
allowHeaders: cors.allowHeaders ?? [
|
|
1479
|
-
"Content-Type",
|
|
1480
|
-
"Authorization"
|
|
1481
|
-
],
|
|
1482
|
-
allowCredentials: cors.allowCredentials ?? true,
|
|
1483
|
-
maxAge: cors.maxAge ?? Duration3.days(1)
|
|
1484
|
-
} : void 0;
|
|
1485
1468
|
const rootHttpApi = new RootHttpApi(this, {
|
|
1469
|
+
...this.props.rootHttpApiProps,
|
|
1486
1470
|
defaultDomainMapping: {
|
|
1487
1471
|
domainName,
|
|
1488
1472
|
mappingKey: void 0
|
|
1489
1473
|
},
|
|
1490
|
-
defaultAuthorizer: cognitoAuthorizer
|
|
1491
|
-
...corsPreflight && { corsPreflight }
|
|
1474
|
+
defaultAuthorizer: cognitoAuthorizer
|
|
1492
1475
|
});
|
|
1493
1476
|
new DiscoverableStringParameter(this, "http-api-url-param", {
|
|
1494
1477
|
ssmParamName: RootHttpApi.SSM_PARAM_NAME,
|