@xube/kit-aws-auth-infrastructure 0.0.84 → 0.0.86

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.
@@ -11,13 +11,13 @@ class AuthAPIManager extends constructs_1.Construct {
11
11
  constructor(scope, id, props) {
12
12
  super(scope, id);
13
13
  this.authApi = new kit_aws_infrastructure_1.XubeRestAPI(scope, id + "xube-api", props);
14
- const userSignUp = new signup_1.SignUpAPI(this, id + '-signup-api', {
15
- name: props.name + '-signup',
16
- authAPI: this.authApi
14
+ const userSignUp = new signup_1.SignUpAPI(this, id + "-signup-api", {
15
+ name: (props.name ?? "auth") + "-signup",
16
+ authAPI: this.authApi,
17
17
  });
18
- const userLogIn = new login_1.LoginAPI(this, id + '-login-api', {
19
- name: props.name + '-login',
20
- authAPI: this.authApi
18
+ const userLogIn = new login_1.LoginAPI(this, id + "-login-api", {
19
+ name: (props.name ?? "auth") + "-login",
20
+ authAPI: this.authApi,
21
21
  });
22
22
  }
23
23
  }
@@ -42,6 +42,7 @@ class AuthManagement extends constructs_1.Construct {
42
42
  });
43
43
  this.authAPIManager = new auth_api_1.AuthAPIManager(scope, id + "-auth-mgr", {
44
44
  userPool: this.userPool.userPool,
45
+ name: props.name ?? "auth",
45
46
  });
46
47
  }
47
48
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xube/kit-aws-auth-infrastructure",
3
- "version": "0.0.84",
3
+ "version": "0.0.86",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -17,14 +17,14 @@
17
17
  },
18
18
  "homepage": "https://github.com/XubeLtd/dev-kit#readme",
19
19
  "devDependencies": {
20
- "@xube/kit-build": "^0.0.84"
20
+ "@xube/kit-build": "^0.0.86"
21
21
  },
22
22
  "dependencies": {
23
- "@xube/kit-aws": "^0.0.84",
24
- "@xube/kit-aws-auth": "^0.0.84",
25
- "@xube/kit-aws-infrastructure": "^0.0.84",
26
- "@xube/kit-constants": "^0.0.84",
27
- "@xube/kit-log": "^0.0.84",
23
+ "@xube/kit-aws": "^0.0.86",
24
+ "@xube/kit-aws-auth": "^0.0.86",
25
+ "@xube/kit-aws-infrastructure": "^0.0.86",
26
+ "@xube/kit-constants": "^0.0.86",
27
+ "@xube/kit-log": "^0.0.86",
28
28
  "aws-cdk-lib": "^2.100.0",
29
29
  "aws-lambda": "^1.0.7",
30
30
  "constructs": "^10.3.0"
@@ -1,5 +1,10 @@
1
1
  import { XubeRestAPI, XubeRestAPIProps } from "@xube/kit-aws-infrastructure";
2
- import { CorsOptions, IAuthorizer, IDomainName, RestApi } from "aws-cdk-lib/aws-apigateway";
2
+ import {
3
+ CorsOptions,
4
+ IAuthorizer,
5
+ IDomainName,
6
+ RestApi,
7
+ } from "aws-cdk-lib/aws-apigateway";
3
8
  import { ICertificate } from "aws-cdk-lib/aws-certificatemanager";
4
9
  import { IUserPool } from "aws-cdk-lib/aws-cognito";
5
10
  import { Construct } from "constructs";
@@ -15,28 +20,19 @@ interface AuthAPIProps extends XubeRestAPIProps {
15
20
  export class AuthAPIManager extends Construct {
16
21
  authApi: XubeRestAPI;
17
22
 
18
- constructor(
19
- scope: Construct,
20
- id: string,
21
- props: AuthAPIProps
22
- ) {
23
+ constructor(scope: Construct, id: string, props: AuthAPIProps) {
23
24
  super(scope, id);
24
25
 
25
26
  this.authApi = new XubeRestAPI(scope, id + "xube-api", props);
26
27
 
27
-
28
- const userSignUp = new SignUpAPI(this, id + '-signup-api', {
29
- name: props.name + '-signup',
30
- authAPI: this.authApi
28
+ const userSignUp = new SignUpAPI(this, id + "-signup-api", {
29
+ name: (props.name ?? "auth") + "-signup",
30
+ authAPI: this.authApi,
31
31
  });
32
32
 
33
- const userLogIn = new LoginAPI(
34
- this,
35
- id + '-login-api',
36
- {
37
- name: props.name + '-login',
38
- authAPI: this.authApi
39
- }
40
- );
33
+ const userLogIn = new LoginAPI(this, id + "-login-api", {
34
+ name: (props.name ?? "auth") + "-login",
35
+ authAPI: this.authApi,
36
+ });
41
37
  }
42
38
  }
@@ -65,6 +65,7 @@ export class AuthManagement extends Construct {
65
65
 
66
66
  this.authAPIManager = new AuthAPIManager(scope, id + "-auth-mgr", {
67
67
  userPool: this.userPool.userPool,
68
+ name: props.name ?? "auth",
68
69
  });
69
70
  }
70
71
  }