@resistdesign/voltra 3.0.0-alpha.16 → 3.0.0-alpha.18
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/README.md +2 -2
- package/api/Indexing/API.d.ts +15 -27
- package/api/ORM/index.d.ts +0 -1
- package/api/index.d.ts +11 -15
- package/api/index.js +1 -163
- package/app/index.d.ts +5 -7
- package/app/index.js +2 -63
- package/app/utils/Route.d.ts +1 -1
- package/build/index.d.ts +9 -1
- package/common/TypeParsing/index.d.ts +3 -3
- package/common/index.d.ts +17 -48
- package/common/index.js +21 -890
- package/iac/SimpleCFT.d.ts +1 -1
- package/iac/index.d.ts +12 -10
- package/iac/index.js +2 -1405
- package/iac/packs/auth/user-management.d.ts +38 -14
- package/iac/packs/auth.d.ts +42 -22
- package/iac/packs/build.d.ts +2 -1
- package/iac/packs/cdn.d.ts +2 -1
- package/iac/packs/cloud-function.d.ts +3 -1
- package/iac/packs/database.d.ts +2 -1
- package/iac/packs/dns.d.ts +2 -1
- package/iac/packs/file-storage.d.ts +2 -1
- package/iac/packs/gateway.d.ts +3 -1
- package/iac/packs/index.d.ts +44 -0
- package/iac/packs/index.js +93 -91
- package/iac/packs/repo.d.ts +2 -1
- package/iac/packs/ssl-certificate.d.ts +2 -1
- package/native/index.d.ts +5 -7
- package/native/index.js +1 -46
- package/package.json +1 -1
- package/web/index.d.ts +5 -7
- package/web/index.js +1 -26
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Configuration for adding Cognito user management resources.
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
type AddUserManagementConfigBase = {
|
|
5
5
|
/**
|
|
6
6
|
* Base id for Cognito resources.
|
|
7
7
|
*/
|
|
@@ -14,18 +14,6 @@ export type AddUserManagementConfig = {
|
|
|
14
14
|
* IAM role name for unauthenticated users.
|
|
15
15
|
*/
|
|
16
16
|
unauthRoleName: string;
|
|
17
|
-
/**
|
|
18
|
-
* Base domain name for the user pool.
|
|
19
|
-
*/
|
|
20
|
-
domainName: any;
|
|
21
|
-
/**
|
|
22
|
-
* Hosted zone id for DNS records.
|
|
23
|
-
*/
|
|
24
|
-
hostedZoneId: any;
|
|
25
|
-
/**
|
|
26
|
-
* SSL certificate ARN for the user pool domain.
|
|
27
|
-
*/
|
|
28
|
-
sslCertificateArn: any;
|
|
29
17
|
/**
|
|
30
18
|
* OAuth callback URLs.
|
|
31
19
|
*/
|
|
@@ -47,10 +35,46 @@ export type AddUserManagementConfig = {
|
|
|
47
35
|
*/
|
|
48
36
|
apiStageName?: any;
|
|
49
37
|
};
|
|
38
|
+
type AddUserManagementConfigWithDomain = AddUserManagementConfigBase & {
|
|
39
|
+
/**
|
|
40
|
+
* Enable a custom Cognito user pool domain and associated Route53 records.
|
|
41
|
+
*
|
|
42
|
+
* Defaults to `true`.
|
|
43
|
+
*/
|
|
44
|
+
enableUserPoolDomain?: true;
|
|
45
|
+
/**
|
|
46
|
+
* Base domain name for the user pool.
|
|
47
|
+
*/
|
|
48
|
+
domainName: any;
|
|
49
|
+
/**
|
|
50
|
+
* Hosted zone id for DNS records.
|
|
51
|
+
*/
|
|
52
|
+
hostedZoneId: any;
|
|
53
|
+
/**
|
|
54
|
+
* SSL certificate ARN for the user pool domain.
|
|
55
|
+
*/
|
|
56
|
+
sslCertificateArn: any;
|
|
57
|
+
};
|
|
58
|
+
type AddUserManagementConfigWithoutDomain = AddUserManagementConfigBase & {
|
|
59
|
+
/**
|
|
60
|
+
* Disable custom Cognito user pool domain resources.
|
|
61
|
+
*/
|
|
62
|
+
enableUserPoolDomain: false;
|
|
63
|
+
domainName?: never;
|
|
64
|
+
hostedZoneId?: never;
|
|
65
|
+
sslCertificateArn?: never;
|
|
66
|
+
baseDomainRecordAliasTargetDNSName?: never;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Configuration for {@link addUserManagement}.
|
|
70
|
+
*/
|
|
71
|
+
export type AddUserManagementConfig = AddUserManagementConfigWithDomain | AddUserManagementConfigWithoutDomain;
|
|
50
72
|
/**
|
|
51
73
|
* Add Cognito user management resources to a template.
|
|
52
74
|
*
|
|
53
75
|
* @param config - User management configuration.
|
|
54
76
|
* @returns CloudFormation template fragment.
|
|
77
|
+
* @group Resource Packs
|
|
55
78
|
*/
|
|
56
|
-
export declare const addUserManagement: import("
|
|
79
|
+
export declare const addUserManagement: import("../..").ResourcePackApplier<AddUserManagementConfig>;
|
|
80
|
+
export {};
|
package/iac/packs/auth.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Configuration for the auth pack.
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
type AddAuthConfigBase = {
|
|
5
5
|
/**
|
|
6
6
|
* Cognito user pool resource id.
|
|
7
7
|
*/
|
|
@@ -14,22 +14,6 @@ export type AddAuthConfig = {
|
|
|
14
14
|
* IAM role name for unauthenticated users.
|
|
15
15
|
*/
|
|
16
16
|
unauthRoleName: string;
|
|
17
|
-
/**
|
|
18
|
-
* Parameter name for Route53 hosted zone id.
|
|
19
|
-
*/
|
|
20
|
-
hostedZoneIdParameterName: string;
|
|
21
|
-
/**
|
|
22
|
-
* Parameter name for base domain.
|
|
23
|
-
*/
|
|
24
|
-
domainNameParameterName: string;
|
|
25
|
-
/**
|
|
26
|
-
* SSL certificate resource id for the user pool domain.
|
|
27
|
-
*/
|
|
28
|
-
sslCertificateId: string;
|
|
29
|
-
/**
|
|
30
|
-
* CloudFront distribution id for the main CDN.
|
|
31
|
-
*/
|
|
32
|
-
mainCDNCloudFrontId: string;
|
|
33
17
|
/**
|
|
34
18
|
* API Gateway REST API id for the backend.
|
|
35
19
|
*/
|
|
@@ -55,12 +39,48 @@ export type AddAuthConfig = {
|
|
|
55
39
|
*/
|
|
56
40
|
logoutUrls: any[];
|
|
57
41
|
};
|
|
42
|
+
type AddAuthConfigWithUserPoolDomain = AddAuthConfigBase & {
|
|
43
|
+
/**
|
|
44
|
+
* Enable a custom Cognito user pool domain and associated Route53 records.
|
|
45
|
+
*
|
|
46
|
+
* Defaults to `true`.
|
|
47
|
+
*/
|
|
48
|
+
enableUserPoolDomain?: true;
|
|
49
|
+
/**
|
|
50
|
+
* Parameter name for Route53 hosted zone id.
|
|
51
|
+
*/
|
|
52
|
+
hostedZoneIdParameterName: string;
|
|
53
|
+
/**
|
|
54
|
+
* Parameter name for base domain.
|
|
55
|
+
*/
|
|
56
|
+
domainNameParameterName: string;
|
|
57
|
+
/**
|
|
58
|
+
* SSL certificate resource id for the user pool domain.
|
|
59
|
+
*/
|
|
60
|
+
sslCertificateId: string;
|
|
61
|
+
/**
|
|
62
|
+
* CloudFront distribution id for the main CDN.
|
|
63
|
+
*/
|
|
64
|
+
mainCDNCloudFrontId: string;
|
|
65
|
+
};
|
|
66
|
+
type AddAuthConfigWithoutUserPoolDomain = AddAuthConfigBase & {
|
|
67
|
+
/**
|
|
68
|
+
* Disable custom Cognito user pool domain resources.
|
|
69
|
+
*/
|
|
70
|
+
enableUserPoolDomain: false;
|
|
71
|
+
hostedZoneIdParameterName?: never;
|
|
72
|
+
domainNameParameterName?: never;
|
|
73
|
+
sslCertificateId?: never;
|
|
74
|
+
mainCDNCloudFrontId?: never;
|
|
75
|
+
};
|
|
58
76
|
/**
|
|
59
|
-
*
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
* */
|
|
77
|
+
* Configuration for {@link addAuth}.
|
|
78
|
+
*/
|
|
79
|
+
export type AddAuthConfig = AddAuthConfigWithUserPoolDomain | AddAuthConfigWithoutUserPoolDomain;
|
|
63
80
|
/**
|
|
64
81
|
* Add auth resources including user management and an admin group.
|
|
82
|
+
*
|
|
83
|
+
* @group Resource Packs
|
|
65
84
|
*/
|
|
66
|
-
export declare const addAuth: import("
|
|
85
|
+
export declare const addAuth: import("..").ResourcePackApplier<AddAuthConfig>;
|
|
86
|
+
export {};
|
package/iac/packs/build.d.ts
CHANGED
|
@@ -87,5 +87,6 @@ export type AddBuildPipelineConfig = {
|
|
|
87
87
|
* Add a build pipeline with full permissions.
|
|
88
88
|
*
|
|
89
89
|
* @param config - Build pipeline configuration.
|
|
90
|
+
* @group Resource Packs
|
|
90
91
|
*/
|
|
91
|
-
export declare const addBuildPipeline: import("
|
|
92
|
+
export declare const addBuildPipeline: import("..").ResourcePackApplier<AddBuildPipelineConfig>;
|
package/iac/packs/cdn.d.ts
CHANGED
|
@@ -28,5 +28,6 @@ export type AddCDNConfig = {
|
|
|
28
28
|
* Includes a DNS record for the domain.
|
|
29
29
|
*
|
|
30
30
|
* @param config - CDN configuration.
|
|
31
|
+
* @group Resource Packs
|
|
31
32
|
* */
|
|
32
|
-
export declare const addCDN: import("
|
|
33
|
+
export declare const addCDN: import("..").ResourcePackApplier<AddCDNConfig>;
|
|
@@ -61,5 +61,7 @@ export type AddCloudFunctionConfig = {
|
|
|
61
61
|
* */
|
|
62
62
|
/**
|
|
63
63
|
* Add a cloud function resource with IAM role and configuration.
|
|
64
|
+
*
|
|
65
|
+
* @group Resource Packs
|
|
64
66
|
*/
|
|
65
|
-
export declare const addCloudFunction: import("
|
|
67
|
+
export declare const addCloudFunction: import("..").ResourcePackApplier<AddCloudFunctionConfig>;
|
package/iac/packs/database.d.ts
CHANGED
|
@@ -27,5 +27,6 @@ export type AddDatabaseConfig = {
|
|
|
27
27
|
* Add a highly available key-value database with global scale performance.
|
|
28
28
|
*
|
|
29
29
|
* @param config - Database configuration.
|
|
30
|
+
* @group Resource Packs
|
|
30
31
|
* */
|
|
31
|
-
export declare const addDatabase: import("
|
|
32
|
+
export declare const addDatabase: import("..").ResourcePackApplier<AddDatabaseConfig>;
|
package/iac/packs/dns.d.ts
CHANGED
|
@@ -29,5 +29,6 @@ export type AddDNSConfig = {
|
|
|
29
29
|
* Optionally includes a front-end live development subdomain.
|
|
30
30
|
*
|
|
31
31
|
* @param config - DNS configuration.
|
|
32
|
+
* @group Resource Packs
|
|
32
33
|
* */
|
|
33
|
-
export declare const addDNS: import("
|
|
34
|
+
export declare const addDNS: import("..").ResourcePackApplier<AddDNSConfig>;
|
|
@@ -41,5 +41,6 @@ export type AddSecureFileStorageConfig = {
|
|
|
41
41
|
* Add a secure S3 Bucket with an optional parameter to set the bucket name.
|
|
42
42
|
*
|
|
43
43
|
* @param config - File storage configuration.
|
|
44
|
+
* @group Resource Packs
|
|
44
45
|
* */
|
|
45
|
-
export declare const addSecureFileStorage: import("
|
|
46
|
+
export declare const addSecureFileStorage: import("..").ResourcePackApplier<AddSecureFileStorageConfig>;
|
package/iac/packs/gateway.d.ts
CHANGED
|
@@ -73,5 +73,7 @@ export type AddGatewayConfig = {
|
|
|
73
73
|
* */
|
|
74
74
|
/**
|
|
75
75
|
* Add API Gateway resources with optional authorizer and DNS.
|
|
76
|
+
*
|
|
77
|
+
* @group Resource Packs
|
|
76
78
|
*/
|
|
77
|
-
export declare const addGateway: import("
|
|
79
|
+
export declare const addGateway: import("..").ResourcePackApplier<AddGatewayConfig>;
|
package/iac/packs/index.d.ts
CHANGED
|
@@ -3,14 +3,58 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Aggregated exports for IaC resource packs.
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @category iac
|
|
8
|
+
* @group Resource Packs
|
|
9
|
+
*/
|
|
6
10
|
export * from "./auth";
|
|
11
|
+
/**
|
|
12
|
+
* @category iac
|
|
13
|
+
* @group Resource Packs
|
|
14
|
+
*/
|
|
7
15
|
export * from "./build";
|
|
16
|
+
/**
|
|
17
|
+
* @category iac
|
|
18
|
+
* @group Utilities
|
|
19
|
+
*/
|
|
8
20
|
export * from "./build/utils";
|
|
21
|
+
/**
|
|
22
|
+
* @category iac
|
|
23
|
+
* @group Resource Packs
|
|
24
|
+
*/
|
|
9
25
|
export * from "./cdn";
|
|
26
|
+
/**
|
|
27
|
+
* @category iac
|
|
28
|
+
* @group Resource Packs
|
|
29
|
+
*/
|
|
10
30
|
export * from "./cloud-function";
|
|
31
|
+
/**
|
|
32
|
+
* @category iac
|
|
33
|
+
* @group Resource Packs
|
|
34
|
+
*/
|
|
11
35
|
export * from "./database";
|
|
36
|
+
/**
|
|
37
|
+
* @category iac
|
|
38
|
+
* @group Resource Packs
|
|
39
|
+
*/
|
|
12
40
|
export * from "./dns";
|
|
41
|
+
/**
|
|
42
|
+
* @category iac
|
|
43
|
+
* @group Resource Packs
|
|
44
|
+
*/
|
|
13
45
|
export * from "./file-storage";
|
|
46
|
+
/**
|
|
47
|
+
* @category iac
|
|
48
|
+
* @group Resource Packs
|
|
49
|
+
*/
|
|
14
50
|
export * from "./gateway";
|
|
51
|
+
/**
|
|
52
|
+
* @category iac
|
|
53
|
+
* @group Resource Packs
|
|
54
|
+
*/
|
|
15
55
|
export * from "./repo";
|
|
56
|
+
/**
|
|
57
|
+
* @category iac
|
|
58
|
+
* @group Resource Packs
|
|
59
|
+
*/
|
|
16
60
|
export * from "./ssl-certificate";
|
package/iac/packs/index.js
CHANGED
|
@@ -170,19 +170,16 @@ var createResourcePack = (creator) => (params, template) => {
|
|
|
170
170
|
|
|
171
171
|
// src/iac/packs/auth/user-management.ts
|
|
172
172
|
var addUserManagement = createResourcePack(
|
|
173
|
-
({
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
apiGatewayRESTAPIId,
|
|
184
|
-
apiStageName
|
|
185
|
-
}) => {
|
|
173
|
+
(config) => {
|
|
174
|
+
const {
|
|
175
|
+
id,
|
|
176
|
+
authRoleName,
|
|
177
|
+
unauthRoleName,
|
|
178
|
+
callbackUrls,
|
|
179
|
+
logoutUrls,
|
|
180
|
+
apiGatewayRESTAPIId,
|
|
181
|
+
apiStageName
|
|
182
|
+
} = config;
|
|
186
183
|
const apiRoleConfig = apiGatewayRESTAPIId && apiStageName ? {
|
|
187
184
|
[`${id}IdentityPoolRoles`]: {
|
|
188
185
|
Type: "AWS::Cognito::IdentityPoolRoleAttachment",
|
|
@@ -317,6 +314,63 @@ var addUserManagement = createResourcePack(
|
|
|
317
314
|
}
|
|
318
315
|
}
|
|
319
316
|
} : {};
|
|
317
|
+
const userPoolDomainConfig = config.enableUserPoolDomain === false ? {} : {
|
|
318
|
+
[`${id}BaseDomainRecord`]: !!config.baseDomainRecordAliasTargetDNSName ? {
|
|
319
|
+
Type: "AWS::Route53::RecordSet",
|
|
320
|
+
DeletionPolicy: "Delete",
|
|
321
|
+
Properties: {
|
|
322
|
+
HostedZoneId: config.hostedZoneId,
|
|
323
|
+
Type: "A",
|
|
324
|
+
Name: config.domainName,
|
|
325
|
+
AliasTarget: {
|
|
326
|
+
HostedZoneId: "Z2FDTNDATAQYW2",
|
|
327
|
+
DNSName: config.baseDomainRecordAliasTargetDNSName
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
} : void 0,
|
|
331
|
+
[`${id}DomainRecord`]: {
|
|
332
|
+
Type: "AWS::Route53::RecordSet",
|
|
333
|
+
DeletionPolicy: "Delete",
|
|
334
|
+
Properties: {
|
|
335
|
+
HostedZoneId: config.hostedZoneId,
|
|
336
|
+
Type: "A",
|
|
337
|
+
Name: {
|
|
338
|
+
"Fn::Sub": [
|
|
339
|
+
"auth.${BaseDomainName}",
|
|
340
|
+
{
|
|
341
|
+
BaseDomainName: config.domainName
|
|
342
|
+
}
|
|
343
|
+
]
|
|
344
|
+
},
|
|
345
|
+
AliasTarget: {
|
|
346
|
+
HostedZoneId: "Z2FDTNDATAQYW2",
|
|
347
|
+
DNSName: {
|
|
348
|
+
"Fn::GetAtt": [`${id}Domain`, "CloudFrontDistribution"]
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
[`${id}Domain`]: {
|
|
354
|
+
Type: "AWS::Cognito::UserPoolDomain",
|
|
355
|
+
DependsOn: !!config.baseDomainRecordAliasTargetDNSName ? `${id}BaseDomainRecord` : void 0,
|
|
356
|
+
Properties: {
|
|
357
|
+
Domain: {
|
|
358
|
+
"Fn::Sub": [
|
|
359
|
+
"auth.${BaseDomainName}",
|
|
360
|
+
{
|
|
361
|
+
BaseDomainName: config.domainName
|
|
362
|
+
}
|
|
363
|
+
]
|
|
364
|
+
},
|
|
365
|
+
UserPoolId: {
|
|
366
|
+
Ref: id
|
|
367
|
+
},
|
|
368
|
+
CustomDomainConfig: {
|
|
369
|
+
CertificateArn: config.sslCertificateArn
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
};
|
|
320
374
|
return {
|
|
321
375
|
Resources: {
|
|
322
376
|
[id]: {
|
|
@@ -370,61 +424,6 @@ var addUserManagement = createResourcePack(
|
|
|
370
424
|
}
|
|
371
425
|
}
|
|
372
426
|
},
|
|
373
|
-
[`${id}BaseDomainRecord`]: !!baseDomainRecordAliasTargetDNSName ? {
|
|
374
|
-
Type: "AWS::Route53::RecordSet",
|
|
375
|
-
DeletionPolicy: "Delete",
|
|
376
|
-
Properties: {
|
|
377
|
-
HostedZoneId: hostedZoneId,
|
|
378
|
-
Type: "A",
|
|
379
|
-
Name: domainName,
|
|
380
|
-
AliasTarget: {
|
|
381
|
-
HostedZoneId: "Z2FDTNDATAQYW2",
|
|
382
|
-
DNSName: baseDomainRecordAliasTargetDNSName
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
} : void 0,
|
|
386
|
-
[`${id}DomainRecord`]: {
|
|
387
|
-
Type: "AWS::Route53::RecordSet",
|
|
388
|
-
DeletionPolicy: "Delete",
|
|
389
|
-
Properties: {
|
|
390
|
-
HostedZoneId: hostedZoneId,
|
|
391
|
-
Type: "A",
|
|
392
|
-
Name: {
|
|
393
|
-
"Fn::Sub": [
|
|
394
|
-
"auth.${BaseDomainName}",
|
|
395
|
-
{
|
|
396
|
-
BaseDomainName: domainName
|
|
397
|
-
}
|
|
398
|
-
]
|
|
399
|
-
},
|
|
400
|
-
AliasTarget: {
|
|
401
|
-
HostedZoneId: "Z2FDTNDATAQYW2",
|
|
402
|
-
DNSName: {
|
|
403
|
-
"Fn::GetAtt": [`${id}Domain`, "CloudFrontDistribution"]
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
},
|
|
408
|
-
[`${id}Domain`]: {
|
|
409
|
-
Type: "AWS::Cognito::UserPoolDomain",
|
|
410
|
-
DependsOn: !!baseDomainRecordAliasTargetDNSName ? `${id}BaseDomainRecord` : void 0,
|
|
411
|
-
Properties: {
|
|
412
|
-
Domain: {
|
|
413
|
-
"Fn::Sub": [
|
|
414
|
-
"auth.${BaseDomainName}",
|
|
415
|
-
{
|
|
416
|
-
BaseDomainName: domainName
|
|
417
|
-
}
|
|
418
|
-
]
|
|
419
|
-
},
|
|
420
|
-
UserPoolId: {
|
|
421
|
-
Ref: id
|
|
422
|
-
},
|
|
423
|
-
CustomDomainConfig: {
|
|
424
|
-
CertificateArn: sslCertificateArn
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
},
|
|
428
427
|
[`${id}Client`]: {
|
|
429
428
|
Type: "AWS::Cognito::UserPoolClient",
|
|
430
429
|
Properties: {
|
|
@@ -470,6 +469,7 @@ var addUserManagement = createResourcePack(
|
|
|
470
469
|
]
|
|
471
470
|
}
|
|
472
471
|
},
|
|
472
|
+
...userPoolDomainConfig,
|
|
473
473
|
...apiRoleConfig
|
|
474
474
|
}
|
|
475
475
|
};
|
|
@@ -488,7 +488,7 @@ var SimpleCFT = class {
|
|
|
488
488
|
}
|
|
489
489
|
/**
|
|
490
490
|
* Apply a pack with configuration to the stack template.
|
|
491
|
-
* @see
|
|
491
|
+
* @see `@resistdesign/voltra/iac` and `@resistdesign/voltra/iac/packs` for examples.
|
|
492
492
|
* */
|
|
493
493
|
applyPack = (pack, params) => {
|
|
494
494
|
this.template = pack(params, this.template);
|
|
@@ -563,43 +563,45 @@ var SimpleCFT = class {
|
|
|
563
563
|
};
|
|
564
564
|
|
|
565
565
|
// src/iac/packs/auth.ts
|
|
566
|
-
var addAuth = createResourcePack(
|
|
567
|
-
|
|
566
|
+
var addAuth = createResourcePack((config) => {
|
|
567
|
+
const {
|
|
568
568
|
userManagementId,
|
|
569
569
|
authRoleName,
|
|
570
570
|
unauthRoleName,
|
|
571
|
-
hostedZoneIdParameterName,
|
|
572
|
-
domainNameParameterName,
|
|
573
|
-
sslCertificateId,
|
|
574
571
|
callbackUrls,
|
|
575
572
|
logoutUrls,
|
|
576
|
-
mainCDNCloudFrontId,
|
|
577
573
|
apiCloudFunctionGatewayId,
|
|
578
574
|
apiStageName,
|
|
579
575
|
adminGroupId,
|
|
580
576
|
userManagementAdminGroupName
|
|
581
|
-
}
|
|
577
|
+
} = config;
|
|
578
|
+
return new SimpleCFT().applyPack(addUserManagement, {
|
|
582
579
|
id: userManagementId,
|
|
583
580
|
authRoleName,
|
|
584
581
|
unauthRoleName,
|
|
585
|
-
domainName: {
|
|
586
|
-
Ref: domainNameParameterName
|
|
587
|
-
},
|
|
588
|
-
hostedZoneId: {
|
|
589
|
-
Ref: hostedZoneIdParameterName
|
|
590
|
-
},
|
|
591
|
-
sslCertificateArn: {
|
|
592
|
-
Ref: sslCertificateId
|
|
593
|
-
},
|
|
594
582
|
callbackUrls,
|
|
595
583
|
logoutUrls,
|
|
596
|
-
baseDomainRecordAliasTargetDNSName: {
|
|
597
|
-
"Fn::GetAtt": [mainCDNCloudFrontId, "DomainName"]
|
|
598
|
-
},
|
|
599
584
|
apiGatewayRESTAPIId: {
|
|
600
585
|
Ref: apiCloudFunctionGatewayId
|
|
601
586
|
},
|
|
602
|
-
apiStageName
|
|
587
|
+
apiStageName,
|
|
588
|
+
...config.enableUserPoolDomain === false ? {
|
|
589
|
+
enableUserPoolDomain: false
|
|
590
|
+
} : {
|
|
591
|
+
enableUserPoolDomain: true,
|
|
592
|
+
domainName: {
|
|
593
|
+
Ref: config.domainNameParameterName
|
|
594
|
+
},
|
|
595
|
+
hostedZoneId: {
|
|
596
|
+
Ref: config.hostedZoneIdParameterName
|
|
597
|
+
},
|
|
598
|
+
sslCertificateArn: {
|
|
599
|
+
Ref: config.sslCertificateId
|
|
600
|
+
},
|
|
601
|
+
baseDomainRecordAliasTargetDNSName: {
|
|
602
|
+
"Fn::GetAtt": [config.mainCDNCloudFrontId, "DomainName"]
|
|
603
|
+
}
|
|
604
|
+
}
|
|
603
605
|
}).patch({
|
|
604
606
|
Resources: {
|
|
605
607
|
[adminGroupId]: {
|
|
@@ -613,8 +615,8 @@ var addAuth = createResourcePack(
|
|
|
613
615
|
}
|
|
614
616
|
}
|
|
615
617
|
}
|
|
616
|
-
}).template
|
|
617
|
-
);
|
|
618
|
+
}).template;
|
|
619
|
+
});
|
|
618
620
|
|
|
619
621
|
// src/iac/packs/build.ts
|
|
620
622
|
var DEFAULT_BUILD_PIPELINE_REPO_PROVIDER = "GitHub";
|
package/iac/packs/repo.d.ts
CHANGED
|
@@ -23,5 +23,6 @@ export type AddRepoConfig = {
|
|
|
23
23
|
* Add repository related parameters for reference in other resources like a build pipeline (CI/CD).
|
|
24
24
|
*
|
|
25
25
|
* @param config - Repository parameter configuration.
|
|
26
|
+
* @group Resource Packs
|
|
26
27
|
* */
|
|
27
|
-
export declare const addRepo: import("
|
|
28
|
+
export declare const addRepo: import("..").ResourcePackApplier<AddRepoConfig>;
|
|
@@ -23,5 +23,6 @@ export type AddSSLCertificateConfig = {
|
|
|
23
23
|
* Add an automatic SSL Certificate for a domain and all of it's subdomains.
|
|
24
24
|
*
|
|
25
25
|
* @param config - SSL certificate configuration.
|
|
26
|
+
* @group Resource Packs
|
|
26
27
|
* */
|
|
27
|
-
export declare const addSSLCertificate: import("
|
|
28
|
+
export declare const addSSLCertificate: import("..").ResourcePackApplier<AddSSLCertificateConfig>;
|
package/native/index.d.ts
CHANGED
|
@@ -4,14 +4,12 @@
|
|
|
4
4
|
* Native entrypoint exports.
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
* @
|
|
8
|
-
*
|
|
7
|
+
* @category native
|
|
8
|
+
* @group Forms
|
|
9
9
|
*/
|
|
10
|
-
export *
|
|
10
|
+
export * from "./forms";
|
|
11
11
|
/**
|
|
12
|
-
* @
|
|
13
|
-
*
|
|
12
|
+
* @category native
|
|
13
|
+
* @group Layout and Navigation
|
|
14
14
|
*/
|
|
15
|
-
export * as Utils from "./utils";
|
|
16
|
-
export * from "./forms";
|
|
17
15
|
export * from "./utils";
|
package/native/index.js
CHANGED
|
@@ -1,30 +1,12 @@
|
|
|
1
1
|
import { createContext, useContext, createElement, useState, useEffect, useMemo, useRef } from 'react';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
4
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
6
5
|
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
7
6
|
}) : x)(function(x) {
|
|
8
7
|
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
9
8
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
10
9
|
});
|
|
11
|
-
var __export = (target, all) => {
|
|
12
|
-
for (var name in all)
|
|
13
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
// src/native/forms/index.ts
|
|
17
|
-
var forms_exports = {};
|
|
18
|
-
__export(forms_exports, {
|
|
19
|
-
ArrayContainer: () => ArrayContainer,
|
|
20
|
-
ArrayItemWrapper: () => ArrayItemWrapper,
|
|
21
|
-
Button: () => Button,
|
|
22
|
-
ErrorMessage: () => ErrorMessage,
|
|
23
|
-
FieldWrapper: () => FieldWrapper,
|
|
24
|
-
createNativeFormRenderer: () => createNativeFormRenderer,
|
|
25
|
-
nativeAutoField: () => nativeAutoField,
|
|
26
|
-
nativeSuite: () => nativeSuite
|
|
27
|
-
});
|
|
28
10
|
|
|
29
11
|
// src/app/forms/core/getFieldKind.ts
|
|
30
12
|
var hasSelectableValues = (field) => {
|
|
@@ -503,33 +485,6 @@ var createNativeFormRenderer = (options) => {
|
|
|
503
485
|
});
|
|
504
486
|
};
|
|
505
487
|
|
|
506
|
-
// src/native/utils/index.ts
|
|
507
|
-
var utils_exports = {};
|
|
508
|
-
__export(utils_exports, {
|
|
509
|
-
NativeEasyLayoutView: () => NativeEasyLayoutView,
|
|
510
|
-
NativeRoute: () => NativeRoute,
|
|
511
|
-
NativeRouteProvider: () => NativeRouteProvider,
|
|
512
|
-
Route: () => Route,
|
|
513
|
-
RouteContext: () => RouteContext,
|
|
514
|
-
RouteContextConsumer: () => RouteContextConsumer,
|
|
515
|
-
RouteContextProvider: () => RouteContextProvider,
|
|
516
|
-
RouteProvider: () => RouteProvider,
|
|
517
|
-
buildHistoryPath: () => buildHistoryPath,
|
|
518
|
-
buildPathFromRouteChain: () => buildPathFromRouteChain,
|
|
519
|
-
buildQueryString: () => buildQueryString,
|
|
520
|
-
buildRoutePath: () => buildRoutePath,
|
|
521
|
-
createManualRouteAdapter: () => createManualRouteAdapter,
|
|
522
|
-
createMemoryHistory: () => createMemoryHistory,
|
|
523
|
-
createNativeBackHandler: () => createNativeBackHandler,
|
|
524
|
-
createNativeHistory: () => createNativeHistory,
|
|
525
|
-
createNavigationStateRouteAdapter: () => createNavigationStateRouteAdapter,
|
|
526
|
-
makeNativeEasyLayout: () => makeNativeEasyLayout,
|
|
527
|
-
mapNativeURLToPath: () => mapNativeURLToPath,
|
|
528
|
-
parseHistoryPath: () => parseHistoryPath,
|
|
529
|
-
useNativeEasyLayout: () => useNativeEasyLayout,
|
|
530
|
-
useRouteContext: () => useRouteContext
|
|
531
|
-
});
|
|
532
|
-
|
|
533
488
|
// src/common/Routing.ts
|
|
534
489
|
var PATH_DELIMITER = "/";
|
|
535
490
|
var getPotentialJSONValue = (value) => {
|
|
@@ -1349,4 +1304,4 @@ var buildPathFromRouteChain = (routeChain, config, query) => {
|
|
|
1349
1304
|
return buildRoutePath(segments, query);
|
|
1350
1305
|
};
|
|
1351
1306
|
|
|
1352
|
-
export { ArrayContainer, ArrayItemWrapper, Button, ErrorMessage, FieldWrapper,
|
|
1307
|
+
export { ArrayContainer, ArrayItemWrapper, Button, ErrorMessage, FieldWrapper, NativeEasyLayoutView, NativeRoute, NativeRouteProvider, Route, RouteContext, RouteContextConsumer, RouteContextProvider, RouteProvider, buildHistoryPath, buildPathFromRouteChain, buildQueryString, buildRoutePath, createManualRouteAdapter, createMemoryHistory, createNativeBackHandler, createNativeFormRenderer, createNativeHistory, createNavigationStateRouteAdapter, makeNativeEasyLayout, mapNativeURLToPath, nativeAutoField, nativeSuite, parseHistoryPath, useNativeEasyLayout, useRouteContext };
|
package/package.json
CHANGED
package/web/index.d.ts
CHANGED
|
@@ -4,14 +4,12 @@
|
|
|
4
4
|
* Web (DOM) entrypoint exports.
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
* @
|
|
8
|
-
*
|
|
7
|
+
* @category web
|
|
8
|
+
* @group Forms
|
|
9
9
|
*/
|
|
10
|
-
export *
|
|
10
|
+
export * from "./forms";
|
|
11
11
|
/**
|
|
12
|
-
* @
|
|
13
|
-
*
|
|
12
|
+
* @category web
|
|
13
|
+
* @group Layout and Navigation
|
|
14
14
|
*/
|
|
15
|
-
export * as Utils from "./utils";
|
|
16
|
-
export * from "./forms";
|
|
17
15
|
export * from "./utils";
|