@resistdesign/voltra 3.0.0-alpha.5 → 3.0.0-alpha.51
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 +392 -14
- package/api/DBX/DBXAsserts.d.ts +95 -0
- package/api/DBX/DBXRequest.d.ts +5 -0
- package/api/DBX/DBXRuntime.d.ts +5 -0
- package/api/DBX/DBXScenarioConfig.d.ts +9 -0
- package/api/DBX/DBXSeed.d.ts +124 -0
- package/api/DBX/DBXTypes.d.ts +176 -0
- package/api/DBX/index.d.ts +8 -0
- package/api/DataAccessControl.d.ts +220 -0
- package/api/Indexing/API.d.ts +224 -0
- package/api/Indexing/Cursor.d.ts +101 -0
- package/api/Indexing/Handler/Config.d.ts +39 -0
- package/api/Indexing/Handler.d.ts +166 -0
- package/api/Indexing/Trace.d.ts +54 -0
- package/api/Indexing/Types.d.ts +204 -0
- package/api/Indexing/ddb/AwsSdkV3Adapter.d.ts +8 -0
- package/api/Indexing/ddb/Types.d.ts +209 -0
- package/api/Indexing/docId.d.ts +27 -0
- package/api/Indexing/exact/ExactDdb.d.ts +58 -0
- package/api/Indexing/exact/ExactIndex.d.ts +90 -0
- package/api/Indexing/exact/ExactS3.d.ts +41 -0
- package/api/Indexing/fieldQualification.d.ts +12 -0
- package/api/Indexing/fulltext/FullTextDdbBackend.d.ts +212 -0
- package/api/Indexing/fulltext/FullTextMemoryBackend.d.ts +93 -0
- package/api/Indexing/fulltext/Schema.d.ts +164 -0
- package/api/Indexing/hashUniversal.d.ts +13 -0
- package/api/Indexing/index.d.ts +45 -0
- package/api/Indexing/lossy/LossyDdb.d.ts +43 -0
- package/api/Indexing/lossy/LossyIndex.d.ts +72 -0
- package/api/Indexing/lossy/LossyS3.d.ts +40 -0
- package/api/Indexing/rel/Cursor.d.ts +25 -0
- package/api/Indexing/rel/Handlers.d.ts +144 -0
- package/api/Indexing/rel/RelationalDdb.d.ts +169 -0
- package/api/Indexing/rel/RelationalInMemoryBackend.d.ts +38 -0
- package/api/Indexing/rel/Types.d.ts +69 -0
- package/api/Indexing/structured/Cursor.d.ts +26 -0
- package/api/Indexing/structured/Handlers.d.ts +128 -0
- package/api/Indexing/structured/SearchStructured.d.ts +44 -0
- package/api/Indexing/structured/StructuredDdb.d.ts +184 -0
- package/api/Indexing/structured/StructuredDdbBackend.d.ts +112 -0
- package/api/Indexing/structured/StructuredInMemoryBackend.d.ts +40 -0
- package/api/Indexing/structured/StructuredInMemoryIndex.d.ts +61 -0
- package/api/Indexing/structured/StructuredStringLike.d.ts +54 -0
- package/api/Indexing/structured/StructuredWriter.d.ts +74 -0
- package/api/Indexing/structured/Types.d.ts +126 -0
- package/api/Indexing/structured/index.d.ts +9 -0
- package/api/Indexing/tokenize.d.ts +31 -0
- package/api/ORM/DACUtils.d.ts +270 -0
- package/api/ORM/ListItemUtils.d.ts +40 -0
- package/api/ORM/ORMRouteMap.d.ts +70 -0
- package/api/ORM/TypeInfoORMService.d.ts +879 -0
- package/api/ORM/drivers/DynamoDBDataItemDBDriver/ConfigTypes.d.ts +229 -0
- package/api/ORM/drivers/DynamoDBDataItemDBDriver.d.ts +90 -0
- package/api/ORM/drivers/InMemoryDataItemDBDriver/ConfigTypes.d.ts +4 -0
- package/api/ORM/drivers/InMemoryDataItemDBDriver.d.ts +56 -0
- package/api/ORM/drivers/InMemoryFileItemDBDriver/ConfigTypes.d.ts +13 -0
- package/api/ORM/drivers/InMemoryFileItemDBDriver.d.ts +98 -0
- package/api/ORM/drivers/InMemoryItemRelationshipDBDriver.d.ts +16 -0
- package/api/ORM/drivers/IndexingRelationshipDriver.d.ts +123 -0
- package/api/ORM/drivers/S3FileItemDBDriver/ConfigTypes.d.ts +322 -0
- package/api/ORM/drivers/S3FileItemDBDriver/S3FileDriver.d.ts +118 -0
- package/api/ORM/drivers/S3FileItemDBDriver.d.ts +71 -0
- package/api/ORM/drivers/common/SupportedTypeInfoORMDBDrivers.d.ts +36 -0
- package/api/ORM/drivers/common/Types.d.ts +202 -0
- package/api/ORM/drivers/common/index.d.ts +2 -0
- package/api/ORM/drivers/index.d.ts +8 -0
- package/api/ORM/getTypeInfoORMIndexingConfigFromTypeInfoMap.d.ts +31 -0
- package/api/ORM/index.d.ts +10 -0
- package/api/ORM/indexing/criteriaToStructuredWhere.d.ts +22 -0
- package/api/Router/AWS.d.ts +80 -0
- package/api/Router/Auth.d.ts +14 -0
- package/api/Router/CORS.d.ts +66 -0
- package/api/Router/Types.d.ts +138 -0
- package/api/Router/index.d.ts +89 -0
- package/api/index.d.ts +72 -6
- package/api/index.js +3553 -1948
- package/app/forms/Engine.d.ts +23 -0
- package/app/forms/UI.d.ts +83 -0
- package/app/forms/core/createAutoField.d.ts +43 -0
- package/app/forms/core/createFormRenderer.d.ts +25 -0
- package/app/forms/core/getFieldKind.d.ts +14 -0
- package/app/forms/core/index.d.ts +11 -0
- package/app/forms/core/mergeSuites.d.ts +23 -0
- package/app/forms/core/resolveSuite.d.ts +15 -0
- package/app/forms/core/types.d.ts +180 -0
- package/app/forms/index.d.ts +9 -0
- package/app/forms/types.d.ts +137 -0
- package/app/helpers/styled.d.ts +3 -0
- package/app/index.d.ts +116 -5
- package/app/index.js +120 -382
- package/app/utils/ApplicationState.d.ts +161 -0
- package/app/utils/ApplicationStateLoader.d.ts +91 -0
- package/app/utils/Controller.d.ts +10 -0
- package/app/utils/Debug.d.ts +14 -0
- package/app/utils/EasyLayout.d.ts +89 -0
- package/app/utils/History.d.ts +165 -0
- package/app/utils/Route.d.ts +207 -0
- package/app/utils/RouteHistory.d.ts +27 -0
- package/app/utils/Service.d.ts +45 -0
- package/app/utils/TypeInfoORMAPIUtils.d.ts +94 -0
- package/app/utils/TypeInfoORMClient.d.ts +104 -0
- package/app/utils/UniversalRouteAdapter.d.ts +73 -0
- package/app/utils/easy-layout/computeAreaBounds.d.ts +5 -0
- package/app/utils/easy-layout/computeTracks.d.ts +16 -0
- package/app/utils/easy-layout/index.d.ts +5 -0
- package/app/utils/easy-layout/parseTemplate.d.ts +12 -0
- package/app/utils/easy-layout/types.d.ts +52 -0
- package/app/utils/easy-layout/validateAreas.d.ts +5 -0
- package/app/utils/index.d.ts +24 -0
- package/build/TypeMapping.d.ts +17 -0
- package/build/TypeParsing.d.ts +10 -0
- package/build/index.d.ts +15 -0
- package/build/index.js +569 -0
- package/chunk-2JDOM6PB.js +138 -0
- package/chunk-3HVYVX3S.js +546 -0
- package/chunk-ATO2455Q.js +258 -0
- package/chunk-BSHQIRBV.js +71 -0
- package/chunk-I2KLQ2HA.js +19 -0
- package/chunk-K4R2PFNG.js +1258 -0
- package/chunk-TJFTWPXQ.js +39 -0
- package/chunk-XHOMAXLR.js +84 -0
- package/common/CommandLine/collectRequiredEnvironmentVariables.d.ts +9 -0
- package/common/CommandLine/index.d.ts +6 -0
- package/common/HelperTypes.d.ts +9 -0
- package/common/IdGeneration/getSimpleId.d.ts +8 -0
- package/common/IdGeneration/index.d.ts +1 -0
- package/common/ItemRelationshipInfoTypes.d.ts +64 -0
- package/common/ItemRelationships/ItemRelationshipValidation.d.ts +21 -0
- package/common/ItemRelationships/index.d.ts +2 -0
- package/common/Logging/Utils.d.ts +10 -0
- package/common/Logging/index.d.ts +1 -0
- package/common/Routing.d.ts +81 -0
- package/common/SearchTypes.d.ts +227 -0
- package/common/SearchUtils.d.ts +55 -0
- package/common/SearchValidation.d.ts +27 -0
- package/common/StringTransformers.d.ts +28 -0
- package/common/Testing/CLI.d.ts +6 -0
- package/common/Testing/Types.d.ts +216 -0
- package/common/Testing/Utils.d.ts +112 -0
- package/common/Testing/index.d.ts +8 -0
- package/common/TypeInfoDataItemUtils.d.ts +39 -0
- package/{Types-C7XjUjoF.d.ts → common/TypeInfoORM/Types.d.ts} +150 -20
- package/common/TypeInfoORM/index.d.ts +3 -0
- package/common/TypeParsing/Constants.d.ts +4 -0
- package/common/TypeParsing/ParsingUtils/Constants.d.ts +8 -0
- package/common/TypeParsing/ParsingUtils/checkType.d.ts +14 -0
- package/common/TypeParsing/ParsingUtils/checkUnionType.d.ts +12 -0
- package/common/TypeParsing/ParsingUtils/extractCommentTags.d.ts +8 -0
- package/common/TypeParsing/ParsingUtils/extractLiteralValues.d.ts +12 -0
- package/common/TypeParsing/ParsingUtils/extractTypeDetails.d.ts +14 -0
- package/common/TypeParsing/ParsingUtils/getPrimaryFieldForTypeInfo.d.ts +18 -0
- package/common/TypeParsing/ParsingUtils/getTypeInfo.d.ts +9 -0
- package/common/TypeParsing/ParsingUtils/getTypeInfoField.d.ts +9 -0
- package/common/TypeParsing/ParsingUtils/getTypeInfoFromAliasType.d.ts +11 -0
- package/common/TypeParsing/ParsingUtils/getTypeInfoFromFieldFilter.d.ts +12 -0
- package/common/TypeParsing/ParsingUtils/getTypeInfoFromTypeAlias.d.ts +11 -0
- package/common/TypeParsing/ParsingUtils/getTypeKeyword.d.ts +9 -0
- package/common/TypeParsing/ParsingUtils/getUnionOrIntersectionTypeInfo.d.ts +11 -0
- package/common/TypeParsing/ParsingUtils/getUnionOrLiteralStringValues.d.ts +8 -0
- package/common/TypeParsing/TypeInfo.d.ts +235 -0
- package/common/TypeParsing/Utils.d.ts +47 -0
- package/common/TypeParsing/Validation.d.ts +327 -0
- package/common/TypeParsing/index.d.ts +8 -0
- package/common/index.d.ts +47 -4
- package/common/index.js +25 -1737
- package/{index-BkFZlfit.d.ts → iac/SimpleCFT.d.ts} +5 -25
- package/iac/index.d.ts +40 -2
- package/iac/index.js +2 -1661
- package/iac/packs/auth.d.ts +131 -0
- package/iac/packs/build/utils.d.ts +289 -0
- package/iac/packs/build.d.ts +92 -0
- package/iac/packs/cdn.d.ts +33 -0
- package/iac/packs/cloud-function.d.ts +67 -0
- package/iac/packs/database.d.ts +32 -0
- package/iac/packs/dns.d.ts +34 -0
- package/iac/packs/file-storage.d.ts +46 -0
- package/iac/packs/gateway.d.ts +82 -0
- package/iac/packs/index.d.ts +60 -1
- package/iac/packs/index.js +391 -594
- package/iac/packs/repo.d.ts +28 -0
- package/iac/packs/ssl-certificate.d.ts +28 -0
- package/iac/types/Constants.d.ts +24 -0
- package/{index-DcvJOZ_c.d.ts → iac/types/IaCTypes.d.ts} +23 -1018
- package/iac/types/Renderers.d.ts +96 -0
- package/iac/types/Types.d.ts +131 -0
- package/iac/types/Utils.d.ts +9 -0
- package/iac/types/generate.d.ts +1 -0
- package/iac/utils/index.d.ts +87 -0
- package/iac/utils/patch-utils.d.ts +66 -0
- package/iac-packs/index.d.ts +6 -0
- package/native/forms/UI.d.ts +73 -0
- package/native/forms/createNativeFormRenderer.d.ts +21 -0
- package/native/forms/index.d.ts +25 -0
- package/native/forms/primitives/index.d.ts +38 -0
- package/native/forms/suite.d.ts +15 -0
- package/native/index.d.ts +19 -0
- package/native/index.js +792 -0
- package/native/testing/react-native.d.ts +46 -0
- package/native/utils/EasyLayout.d.ts +88 -0
- package/native/utils/History.d.ts +124 -0
- package/native/utils/NavButton.d.ts +25 -0
- package/native/utils/Route.d.ts +41 -0
- package/native/utils/index.d.ts +25 -0
- package/package.json +54 -21
- package/web/forms/UI.d.ts +74 -0
- package/web/forms/createWebFormRenderer.d.ts +21 -0
- package/web/forms/index.d.ts +9 -0
- package/web/forms/primitives/index.d.ts +21 -0
- package/web/forms/suite.d.ts +15 -0
- package/web/index.d.ts +15 -0
- package/web/index.js +701 -0
- package/web/utils/EasyLayout.d.ts +47 -0
- package/web/utils/NavLink.d.ts +24 -0
- package/web/utils/Route.d.ts +16 -0
- package/web/utils/index.d.ts +8 -0
- package/SearchTypes-DjN6YQzE.d.ts +0 -577
- package/Validation-CFP59oIP.d.ts +0 -226
- package/index-C3-iD9Mh.d.ts +0 -690
- package/index-CK5Qwvfb.d.ts +0 -5378
- package/index-IokxSNxm.d.ts +0 -745
- package/index.d.ts +0 -13
- package/index.js +0 -11005
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Optional logical ids for resources generated by {@link addAuth}.
|
|
3
|
+
*/
|
|
4
|
+
export type UserManagementIds = {
|
|
5
|
+
userPool?: string;
|
|
6
|
+
userPoolClient?: string;
|
|
7
|
+
identityPool?: string;
|
|
8
|
+
authRole?: string;
|
|
9
|
+
unauthRole?: string;
|
|
10
|
+
roleAttachment?: string;
|
|
11
|
+
domain?: string;
|
|
12
|
+
domainRecord?: string;
|
|
13
|
+
baseDomainRecord?: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Configuration for the auth pack.
|
|
17
|
+
*/
|
|
18
|
+
export type AddAuthConfigBase = {
|
|
19
|
+
/**
|
|
20
|
+
* Base id for Cognito resources.
|
|
21
|
+
*/
|
|
22
|
+
userManagementId: string;
|
|
23
|
+
/**
|
|
24
|
+
* IAM role name for authenticated users.
|
|
25
|
+
*/
|
|
26
|
+
authRoleName: string;
|
|
27
|
+
/**
|
|
28
|
+
* IAM role name for unauthenticated users.
|
|
29
|
+
*/
|
|
30
|
+
unauthRoleName: string;
|
|
31
|
+
/**
|
|
32
|
+
* API Gateway REST API id for authenticated access.
|
|
33
|
+
*/
|
|
34
|
+
apiCloudFunctionGatewayId: string;
|
|
35
|
+
/**
|
|
36
|
+
* API Gateway stage name for authenticated access.
|
|
37
|
+
*/
|
|
38
|
+
apiStageName: string;
|
|
39
|
+
/**
|
|
40
|
+
* Resource id for the admin group.
|
|
41
|
+
*/
|
|
42
|
+
adminGroupId: string;
|
|
43
|
+
/**
|
|
44
|
+
* Cognito group name for admins.
|
|
45
|
+
*/
|
|
46
|
+
userManagementAdminGroupName: string;
|
|
47
|
+
/**
|
|
48
|
+
* Optional explicit logical ids for generated user-management resources.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* userManagementIds: {
|
|
53
|
+
* userPool: "MyUserPool",
|
|
54
|
+
* userPoolClient: "MyUserPoolClient",
|
|
55
|
+
* }
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
userManagementIds?: UserManagementIds;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Configuration for adding auth resources including a user pool domain with
|
|
62
|
+
* callback and logout URLs.
|
|
63
|
+
*/
|
|
64
|
+
export type AddAuthConfigWithUserPoolDomain = AddAuthConfigBase & {
|
|
65
|
+
/**
|
|
66
|
+
* Enable Cognito Hosted UI/OAuth redirect mode by creating a custom user pool
|
|
67
|
+
* domain plus Route53 records.
|
|
68
|
+
*
|
|
69
|
+
* When enabled, the generated user pool client uses OAuth flows (`code`,
|
|
70
|
+
* `implicit`) and supports callback/logout URL configuration.
|
|
71
|
+
*
|
|
72
|
+
* Defaults to `true`. Set `false` to opt out of Hosted UI resources and use
|
|
73
|
+
* SDK/API-based sign-in flows only.
|
|
74
|
+
*/
|
|
75
|
+
enableUserPoolDomain?: true;
|
|
76
|
+
/**
|
|
77
|
+
* Parameter name for the Route53 hosted zone id that owns `domainName`.
|
|
78
|
+
*/
|
|
79
|
+
hostedZoneIdParameterName: string;
|
|
80
|
+
/**
|
|
81
|
+
* Parameter name for the base domain used for the auth subdomain.
|
|
82
|
+
*/
|
|
83
|
+
domainNameParameterName: string;
|
|
84
|
+
/**
|
|
85
|
+
* ACM certificate resource id (in `us-east-1`) for the Cognito custom
|
|
86
|
+
* domain.
|
|
87
|
+
*/
|
|
88
|
+
sslCertificateId: string;
|
|
89
|
+
/**
|
|
90
|
+
* CloudFront distribution resource id used as the base-domain alias target.
|
|
91
|
+
*/
|
|
92
|
+
mainCDNCloudFrontId: string;
|
|
93
|
+
/**
|
|
94
|
+
* OAuth callback URLs for Hosted UI/federated redirect flows.
|
|
95
|
+
*/
|
|
96
|
+
callbackUrls: any[];
|
|
97
|
+
/**
|
|
98
|
+
* OAuth logout redirect URLs for Hosted UI sign-out.
|
|
99
|
+
*/
|
|
100
|
+
logoutUrls: any[];
|
|
101
|
+
/**
|
|
102
|
+
* Supported identity providers for Hosted UI/OAuth flows.
|
|
103
|
+
*/
|
|
104
|
+
supportedIdentityProviders?: any[];
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Configuration for adding auth resources without a user pool domain.
|
|
108
|
+
*/
|
|
109
|
+
export type AddAuthConfigWithoutUserPoolDomain = AddAuthConfigBase & {
|
|
110
|
+
/**
|
|
111
|
+
* Disable Cognito Hosted UI/OAuth redirect configuration.
|
|
112
|
+
*/
|
|
113
|
+
enableUserPoolDomain: false;
|
|
114
|
+
hostedZoneIdParameterName?: never;
|
|
115
|
+
domainNameParameterName?: never;
|
|
116
|
+
sslCertificateId?: never;
|
|
117
|
+
mainCDNCloudFrontId?: never;
|
|
118
|
+
callbackUrls?: never;
|
|
119
|
+
logoutUrls?: never;
|
|
120
|
+
supportedIdentityProviders?: never;
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* Configuration for {@link addAuth}.
|
|
124
|
+
*/
|
|
125
|
+
export type AddAuthConfig = AddAuthConfigWithUserPoolDomain | AddAuthConfigWithoutUserPoolDomain;
|
|
126
|
+
/**
|
|
127
|
+
* Add auth resources including user management and an admin group.
|
|
128
|
+
*
|
|
129
|
+
* @group Resource Packs
|
|
130
|
+
*/
|
|
131
|
+
export declare const addAuth: import("..").ResourcePackApplier<AddAuthConfig>;
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Require at least one key from the provided type.
|
|
3
|
+
*
|
|
4
|
+
* @typeParam T - Base object type.
|
|
5
|
+
* @typeParam U - Helper mapped type.
|
|
6
|
+
*/
|
|
7
|
+
export type AtLeastOne<T, U = {
|
|
8
|
+
[K in keyof T]: Pick<T, K>;
|
|
9
|
+
}> = Partial<T> & U[keyof U];
|
|
10
|
+
/**
|
|
11
|
+
* Helper functions for generating CLI commands in build specs.
|
|
12
|
+
*/
|
|
13
|
+
export declare const COMMAND_HELPERS: {
|
|
14
|
+
updateFunction: ({ cloudFunctionArn, codeZipFilePath, }: {
|
|
15
|
+
cloudFunctionArn: string;
|
|
16
|
+
codeZipFilePath: string;
|
|
17
|
+
}) => string;
|
|
18
|
+
copyDirectoryToS3: ({ s3Domain, directoryPath, }: {
|
|
19
|
+
s3Domain: string;
|
|
20
|
+
directoryPath: string;
|
|
21
|
+
}) => string;
|
|
22
|
+
cloudFrontInvalidation: ({ cloudFrontDistributionId, pathsToInvalidate, }: {
|
|
23
|
+
cloudFrontDistributionId: string;
|
|
24
|
+
pathsToInvalidate?: string[];
|
|
25
|
+
}) => string;
|
|
26
|
+
addNPMTokenWithNPMRC: ({ npmToken }: {
|
|
27
|
+
npmToken: string;
|
|
28
|
+
}) => string;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Linux user name string.
|
|
32
|
+
*/
|
|
33
|
+
export type LinuxUserNameString = string;
|
|
34
|
+
/**
|
|
35
|
+
* Flag value for yes/no configuration fields.
|
|
36
|
+
*/
|
|
37
|
+
export type YesOrNo = "yes" | "no";
|
|
38
|
+
/**
|
|
39
|
+
* BuildSpec environment configuration.
|
|
40
|
+
*/
|
|
41
|
+
export interface Env {
|
|
42
|
+
/**
|
|
43
|
+
* Shell to use for command execution.
|
|
44
|
+
*/
|
|
45
|
+
shell?: "bash" | "/bin/sh" | "powershell.exe" | "cmd.exe" | string;
|
|
46
|
+
/**
|
|
47
|
+
* Environment variables to expose.
|
|
48
|
+
*/
|
|
49
|
+
variables?: Record<string, string>;
|
|
50
|
+
/**
|
|
51
|
+
* SSM parameter store references.
|
|
52
|
+
*/
|
|
53
|
+
"parameter-store"?: Record<string, string>;
|
|
54
|
+
/**
|
|
55
|
+
* Exported variable names.
|
|
56
|
+
*/
|
|
57
|
+
"exported-variables"?: string[];
|
|
58
|
+
/**
|
|
59
|
+
* Secrets Manager references.
|
|
60
|
+
*/
|
|
61
|
+
"secrets-manager"?: Record<string, `${string}:${string}:${string}:${string}`>;
|
|
62
|
+
/**
|
|
63
|
+
* Whether to enable git credential helper.
|
|
64
|
+
*/
|
|
65
|
+
"git-credential-helper"?: YesOrNo;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* BuildSpec proxy configuration.
|
|
69
|
+
*/
|
|
70
|
+
export interface Proxy {
|
|
71
|
+
/**
|
|
72
|
+
* Whether to upload build artifacts via proxy.
|
|
73
|
+
*/
|
|
74
|
+
"upload-artifacts"?: YesOrNo;
|
|
75
|
+
/**
|
|
76
|
+
* Whether to proxy logs.
|
|
77
|
+
*/
|
|
78
|
+
logs?: YesOrNo;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* BuildSpec batch build configuration.
|
|
82
|
+
*/
|
|
83
|
+
export interface Batch {
|
|
84
|
+
/**
|
|
85
|
+
* Whether to fail fast for batch builds.
|
|
86
|
+
*/
|
|
87
|
+
"fast-fail"?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Batch build list config.
|
|
90
|
+
*/
|
|
91
|
+
"build-list"?: any;
|
|
92
|
+
/**
|
|
93
|
+
* Batch build matrix config.
|
|
94
|
+
*/
|
|
95
|
+
"build-matrix"?: any;
|
|
96
|
+
/**
|
|
97
|
+
* Batch build graph config.
|
|
98
|
+
*/
|
|
99
|
+
"build-graph"?: any;
|
|
100
|
+
[key: string]: any;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* BuildSpec phase configuration.
|
|
104
|
+
*/
|
|
105
|
+
export interface Phase {
|
|
106
|
+
/**
|
|
107
|
+
* Runtime versions for this phase.
|
|
108
|
+
*/
|
|
109
|
+
"runtime-versions"?: Record<string, any>;
|
|
110
|
+
/**
|
|
111
|
+
* User to run commands as.
|
|
112
|
+
*/
|
|
113
|
+
"run-as"?: LinuxUserNameString;
|
|
114
|
+
/**
|
|
115
|
+
* Behavior when a command fails.
|
|
116
|
+
*/
|
|
117
|
+
"on-failure"?: "ABORT" | "CONTINUE";
|
|
118
|
+
/**
|
|
119
|
+
* Commands to run during the phase.
|
|
120
|
+
*/
|
|
121
|
+
commands: string[];
|
|
122
|
+
/**
|
|
123
|
+
* Commands to always run at the end of the phase.
|
|
124
|
+
*/
|
|
125
|
+
finally?: string[];
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* BuildSpec phase collection (at least one phase required).
|
|
129
|
+
*/
|
|
130
|
+
export type PhaseConfig = AtLeastOne<{
|
|
131
|
+
install: Phase;
|
|
132
|
+
pre_build: Phase;
|
|
133
|
+
build: Phase;
|
|
134
|
+
post_build: Phase;
|
|
135
|
+
}>;
|
|
136
|
+
/**
|
|
137
|
+
* Report group configuration for build reports.
|
|
138
|
+
*/
|
|
139
|
+
export interface ReportGroupNameOrArn {
|
|
140
|
+
/**
|
|
141
|
+
* Report files to include.
|
|
142
|
+
*/
|
|
143
|
+
files?: string[];
|
|
144
|
+
/**
|
|
145
|
+
* Base directory for report files.
|
|
146
|
+
*/
|
|
147
|
+
"base-directory"?: string;
|
|
148
|
+
/**
|
|
149
|
+
* Whether to discard path prefixes.
|
|
150
|
+
*/
|
|
151
|
+
"discard-paths"?: string;
|
|
152
|
+
/**
|
|
153
|
+
* Report file format.
|
|
154
|
+
*/
|
|
155
|
+
"file-format"?: string;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Reports configuration for BuildSpec.
|
|
159
|
+
*/
|
|
160
|
+
export interface Reports {
|
|
161
|
+
/**
|
|
162
|
+
* Report group name or ARN.
|
|
163
|
+
*/
|
|
164
|
+
"report-group-name-or-arn"?: ReportGroupNameOrArn;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Artifact identifier configuration.
|
|
168
|
+
*/
|
|
169
|
+
export interface ArtifactIdentifier {
|
|
170
|
+
/**
|
|
171
|
+
* Artifact file list.
|
|
172
|
+
*/
|
|
173
|
+
files?: string[];
|
|
174
|
+
/**
|
|
175
|
+
* Artifact name.
|
|
176
|
+
*/
|
|
177
|
+
name?: string;
|
|
178
|
+
/**
|
|
179
|
+
* Whether to discard path prefixes.
|
|
180
|
+
*/
|
|
181
|
+
"discard-paths"?: string;
|
|
182
|
+
/**
|
|
183
|
+
* Base directory for artifact files.
|
|
184
|
+
*/
|
|
185
|
+
"base-directory"?: string;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Secondary artifacts configuration.
|
|
189
|
+
*/
|
|
190
|
+
export interface SecondaryArtifacts {
|
|
191
|
+
/**
|
|
192
|
+
* Artifact identifier for secondary artifacts.
|
|
193
|
+
*/
|
|
194
|
+
artifactIdentifier?: ArtifactIdentifier;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Artifacts configuration for BuildSpec.
|
|
198
|
+
*/
|
|
199
|
+
export interface Artifacts {
|
|
200
|
+
/**
|
|
201
|
+
* Artifact file list.
|
|
202
|
+
*/
|
|
203
|
+
files?: string[];
|
|
204
|
+
/**
|
|
205
|
+
* Artifact name.
|
|
206
|
+
*/
|
|
207
|
+
name?: string;
|
|
208
|
+
/**
|
|
209
|
+
* Whether to discard path prefixes.
|
|
210
|
+
*/
|
|
211
|
+
"discard-paths"?: string;
|
|
212
|
+
/**
|
|
213
|
+
* Base directory for artifact files.
|
|
214
|
+
*/
|
|
215
|
+
"base-directory"?: string;
|
|
216
|
+
/**
|
|
217
|
+
* Paths to exclude from artifacts.
|
|
218
|
+
*/
|
|
219
|
+
"exclude-paths"?: string;
|
|
220
|
+
/**
|
|
221
|
+
* Whether to enable symlinks in artifacts.
|
|
222
|
+
*/
|
|
223
|
+
"enable-symlinks"?: string;
|
|
224
|
+
/**
|
|
225
|
+
* S3 prefix for artifact upload.
|
|
226
|
+
*/
|
|
227
|
+
"s3-prefix"?: string;
|
|
228
|
+
/**
|
|
229
|
+
* Secondary artifacts configuration.
|
|
230
|
+
*/
|
|
231
|
+
"secondary-artifacts"?: SecondaryArtifacts;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Cache configuration for BuildSpec.
|
|
235
|
+
*/
|
|
236
|
+
export interface Cache {
|
|
237
|
+
/**
|
|
238
|
+
* Cache paths to persist between builds.
|
|
239
|
+
*/
|
|
240
|
+
paths?: string[];
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* BuildSpec configuration object.
|
|
244
|
+
*/
|
|
245
|
+
export interface BuildSpec {
|
|
246
|
+
/**
|
|
247
|
+
* Build spec version.
|
|
248
|
+
*/
|
|
249
|
+
version?: number;
|
|
250
|
+
/**
|
|
251
|
+
* User to run build commands as.
|
|
252
|
+
*/
|
|
253
|
+
"run-as"?: LinuxUserNameString;
|
|
254
|
+
/**
|
|
255
|
+
* Environment configuration.
|
|
256
|
+
*/
|
|
257
|
+
env?: Env;
|
|
258
|
+
/**
|
|
259
|
+
* Proxy configuration.
|
|
260
|
+
*/
|
|
261
|
+
proxy?: Proxy;
|
|
262
|
+
/**
|
|
263
|
+
* Batch build configuration.
|
|
264
|
+
*/
|
|
265
|
+
batch?: Batch;
|
|
266
|
+
/**
|
|
267
|
+
* Build phases configuration.
|
|
268
|
+
*/
|
|
269
|
+
phases: PhaseConfig;
|
|
270
|
+
/**
|
|
271
|
+
* Reports configuration.
|
|
272
|
+
*/
|
|
273
|
+
reports?: Reports;
|
|
274
|
+
/**
|
|
275
|
+
* Artifacts configuration.
|
|
276
|
+
*/
|
|
277
|
+
artifacts?: Artifacts;
|
|
278
|
+
/**
|
|
279
|
+
* Cache configuration.
|
|
280
|
+
*/
|
|
281
|
+
cache?: Cache;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Create a build spec YAML string for a build pipeline (CI/CD).
|
|
285
|
+
*
|
|
286
|
+
* @param config - Build spec configuration.
|
|
287
|
+
* @returns YAML string for the build spec.
|
|
288
|
+
*/
|
|
289
|
+
export declare const createBuildSpec: ({ version, phases }: BuildSpec) => string;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { AWS } from "../types/IaCTypes";
|
|
2
|
+
/**
|
|
3
|
+
* Default repository provider for CodePipeline source actions.
|
|
4
|
+
*/
|
|
5
|
+
export declare const DEFAULT_BUILD_PIPELINE_REPO_PROVIDER = "GitHub";
|
|
6
|
+
/**
|
|
7
|
+
* Source repository configuration for the build pipeline.
|
|
8
|
+
*/
|
|
9
|
+
export type BuildPipelineRepoConfig = {
|
|
10
|
+
/**
|
|
11
|
+
* CodePipeline provider (e.g., GitHub).
|
|
12
|
+
*/
|
|
13
|
+
provider?: any;
|
|
14
|
+
/**
|
|
15
|
+
* Repository owner/organization.
|
|
16
|
+
*/
|
|
17
|
+
owner: any;
|
|
18
|
+
/**
|
|
19
|
+
* Repository name.
|
|
20
|
+
*/
|
|
21
|
+
repo: any;
|
|
22
|
+
/**
|
|
23
|
+
* Repository branch name.
|
|
24
|
+
*/
|
|
25
|
+
branch: any;
|
|
26
|
+
/**
|
|
27
|
+
* OAuth token for source access.
|
|
28
|
+
*/
|
|
29
|
+
oauthToken: any;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Helper for custom CodeBuild string literals.
|
|
33
|
+
*/
|
|
34
|
+
export type CustomCodeBuildString<T extends string> = T & {
|
|
35
|
+
__custom?: never;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Allowed CodeBuild environment types.
|
|
39
|
+
*/
|
|
40
|
+
export type CodeBuildEnvironmentType = "ARM_CONTAINER" | "LINUX_CONTAINER" | "LINUX_GPU_CONTAINER" | "WINDOWS_SERVER_2019_CONTAINER" | "WINDOWS_SERVER_2022_CONTAINER" | "LINUX_EC2" | "ARM_EC2" | "WINDOWS_EC2" | "MAC_ARM" | CustomCodeBuildString<string>;
|
|
41
|
+
/**
|
|
42
|
+
* Allowed CodeBuild compute types.
|
|
43
|
+
*/
|
|
44
|
+
export type CodeBuildComputeType = "BUILD_GENERAL1_SMALL" | "BUILD_GENERAL1_MEDIUM" | "BUILD_GENERAL1_LARGE" | "BUILD_GENERAL1_2XLARGE" | "BUILD_GENERAL1_XLARGE" | CustomCodeBuildString<string>;
|
|
45
|
+
/**
|
|
46
|
+
* Configuration for the build pipeline pack.
|
|
47
|
+
*/
|
|
48
|
+
export type AddBuildPipelineConfig = {
|
|
49
|
+
/**
|
|
50
|
+
* Base id for created resources.
|
|
51
|
+
*/
|
|
52
|
+
id: string;
|
|
53
|
+
/**
|
|
54
|
+
* Build spec YAML or JSON.
|
|
55
|
+
*/
|
|
56
|
+
buildSpec: any;
|
|
57
|
+
/**
|
|
58
|
+
* Optional resource dependencies.
|
|
59
|
+
*/
|
|
60
|
+
dependsOn?: string | string[];
|
|
61
|
+
/**
|
|
62
|
+
* CodeBuild environment variables.
|
|
63
|
+
*/
|
|
64
|
+
environmentVariables?: AWS.CodeBuild.Project.EnvironmentVariable[];
|
|
65
|
+
/**
|
|
66
|
+
* Build timeout in minutes.
|
|
67
|
+
*/
|
|
68
|
+
timeoutInMinutes?: number;
|
|
69
|
+
/**
|
|
70
|
+
* CodeBuild environment type.
|
|
71
|
+
*/
|
|
72
|
+
environmentType?: CodeBuildEnvironmentType;
|
|
73
|
+
/**
|
|
74
|
+
* CodeBuild compute type.
|
|
75
|
+
*/
|
|
76
|
+
environmentComputeType?: CodeBuildComputeType;
|
|
77
|
+
/**
|
|
78
|
+
* CodeBuild image to run.
|
|
79
|
+
*/
|
|
80
|
+
environmentImage?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Repository configuration for source stage.
|
|
83
|
+
*/
|
|
84
|
+
repoConfig: BuildPipelineRepoConfig;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Add a build pipeline with full permissions.
|
|
88
|
+
*
|
|
89
|
+
* @param config - Build pipeline configuration.
|
|
90
|
+
* @group Resource Packs
|
|
91
|
+
*/
|
|
92
|
+
export declare const addBuildPipeline: import("..").ResourcePackApplier<AddBuildPipelineConfig>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration for the CDN pack.
|
|
3
|
+
*/
|
|
4
|
+
export type AddCDNConfig = {
|
|
5
|
+
/**
|
|
6
|
+
* CloudFront distribution id.
|
|
7
|
+
*/
|
|
8
|
+
id: string;
|
|
9
|
+
/**
|
|
10
|
+
* Route53 hosted zone id for the domain.
|
|
11
|
+
*/
|
|
12
|
+
hostedZoneId: any;
|
|
13
|
+
/**
|
|
14
|
+
* Domain name to serve.
|
|
15
|
+
*/
|
|
16
|
+
domainName: any;
|
|
17
|
+
/**
|
|
18
|
+
* ACM certificate ARN for the domain.
|
|
19
|
+
*/
|
|
20
|
+
certificateArn: any;
|
|
21
|
+
/**
|
|
22
|
+
* S3 file storage resource id.
|
|
23
|
+
*/
|
|
24
|
+
fileStorageId: string;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Add a global cache of static files (a CDN) for things like your front-end, website, etc.
|
|
28
|
+
* Includes a DNS record for the domain.
|
|
29
|
+
*
|
|
30
|
+
* @param config - CDN configuration.
|
|
31
|
+
* @group Resource Packs
|
|
32
|
+
* */
|
|
33
|
+
export declare const addCDN: import("..").ResourcePackApplier<AddCDNConfig>;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
*
|
|
4
|
+
* Lambda pack that provisions a basic function with an IAM role and optional
|
|
5
|
+
* environment settings.
|
|
6
|
+
*/
|
|
7
|
+
import { AWS } from "../types/IaCTypes";
|
|
8
|
+
/**
|
|
9
|
+
* Default inline function code for placeholder Lambda resources.
|
|
10
|
+
*/
|
|
11
|
+
export declare const PLACEHOLDER_FUNCTION_CODE: AWS.Lambda.Function.Code;
|
|
12
|
+
/**
|
|
13
|
+
* Supported Lambda runtimes for cloud functions.
|
|
14
|
+
*/
|
|
15
|
+
export type CloudFunctionRuntime = "nodejs14.x" | "nodejs16.x" | "nodejs18.x" | "nodejs20.x" | "nodejs22.x" | "nodejs24.x" | "nodejs26.x" | "python3.8" | "python3.9" | "python3.10" | "python3.11" | "python3.12" | "python3.13" | "python3.14" | "python3.15" | "java11" | "java17" | "java21" | "java25" | "dotnet6" | "dotnet8" | "dotnet10" | "go1.x" | "ruby2.7" | "ruby3.2" | "ruby3.3" | "ruby3.4" | "ruby3.5" | "provided" | "provided.al2" | "provided.al2023";
|
|
16
|
+
/**
|
|
17
|
+
* Configuration for the cloud function pack.
|
|
18
|
+
*/
|
|
19
|
+
export type AddCloudFunctionConfig = {
|
|
20
|
+
/**
|
|
21
|
+
* Base id for the function resources.
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
* Lambda function code.
|
|
26
|
+
*/
|
|
27
|
+
code?: AWS.Lambda.Function.Code;
|
|
28
|
+
/**
|
|
29
|
+
* Lambda environment configuration.
|
|
30
|
+
*/
|
|
31
|
+
environment?: AWS.Lambda.Function.Environment;
|
|
32
|
+
/**
|
|
33
|
+
* Function handler entrypoint.
|
|
34
|
+
*/
|
|
35
|
+
handler?: any;
|
|
36
|
+
/**
|
|
37
|
+
* Lambda runtime.
|
|
38
|
+
*/
|
|
39
|
+
runtime?: CloudFunctionRuntime;
|
|
40
|
+
/**
|
|
41
|
+
* Function timeout in seconds.
|
|
42
|
+
*/
|
|
43
|
+
timeout?: any;
|
|
44
|
+
/**
|
|
45
|
+
* IAM policy statements to attach to the role.
|
|
46
|
+
*/
|
|
47
|
+
policies?: AWS.IAM.Role.Policy[];
|
|
48
|
+
/**
|
|
49
|
+
* Lambda function memory size in MB.
|
|
50
|
+
*
|
|
51
|
+
* You can configure memory between 128 MB and 10,240 MB in 1-MB increments.
|
|
52
|
+
*
|
|
53
|
+
* @default 128
|
|
54
|
+
*/
|
|
55
|
+
memorySize?: number;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Add a serverless cloud function to run part or all of your API (back-end) without always running servers.
|
|
59
|
+
*
|
|
60
|
+
* @param config - Cloud function configuration.
|
|
61
|
+
* */
|
|
62
|
+
/**
|
|
63
|
+
* Add a cloud function resource with IAM role and configuration.
|
|
64
|
+
*
|
|
65
|
+
* @group Resource Packs
|
|
66
|
+
*/
|
|
67
|
+
export declare const addCloudFunction: import("..").ResourcePackApplier<AddCloudFunctionConfig>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The configuration for adding a database to a stack.
|
|
3
|
+
* */
|
|
4
|
+
export type AddDatabaseConfig = {
|
|
5
|
+
/**
|
|
6
|
+
* The id of the database table in a stack.
|
|
7
|
+
* */
|
|
8
|
+
tableId: string;
|
|
9
|
+
/**
|
|
10
|
+
* The name of the database table.
|
|
11
|
+
* */
|
|
12
|
+
tableName?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The keys for the database table.
|
|
15
|
+
* */
|
|
16
|
+
keys: Record<string, "HASH" | "RANGE">;
|
|
17
|
+
/**
|
|
18
|
+
* Specific attributes for the database table.
|
|
19
|
+
* */
|
|
20
|
+
attributes: Record<string, "S" | "N" | "B" | "BOOL" | "NULL" | "M" | "L" | "SS" | "NS" | "BS">;
|
|
21
|
+
/**
|
|
22
|
+
* The billing mode for the database table.
|
|
23
|
+
* */
|
|
24
|
+
billingMode?: "PAY_PER_REQUEST" | "PROVISIONED";
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Add a highly available key-value database with global scale performance.
|
|
28
|
+
*
|
|
29
|
+
* @param config - Database configuration.
|
|
30
|
+
* @group Resource Packs
|
|
31
|
+
* */
|
|
32
|
+
export declare const addDatabase: import("..").ResourcePackApplier<AddDatabaseConfig>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { CloudFormationPrimitiveValue } from "../types/IaCTypes";
|
|
2
|
+
/**
|
|
3
|
+
* Configuration for the DNS record pack.
|
|
4
|
+
*/
|
|
5
|
+
export type AddDNSConfig = {
|
|
6
|
+
/**
|
|
7
|
+
* Resource id for the DNS record.
|
|
8
|
+
*/
|
|
9
|
+
id: string;
|
|
10
|
+
/**
|
|
11
|
+
* Hosted zone id for the domain.
|
|
12
|
+
*/
|
|
13
|
+
hostedZoneId: CloudFormationPrimitiveValue<string>;
|
|
14
|
+
/**
|
|
15
|
+
* Fully qualified domain name.
|
|
16
|
+
*/
|
|
17
|
+
domainName: CloudFormationPrimitiveValue<string>;
|
|
18
|
+
/**
|
|
19
|
+
* Resource records for the DNS entry.
|
|
20
|
+
*/
|
|
21
|
+
resourceRecords: CloudFormationPrimitiveValue<string>[];
|
|
22
|
+
/**
|
|
23
|
+
* DNS record type.
|
|
24
|
+
*/
|
|
25
|
+
recordType?: CloudFormationPrimitiveValue<string>;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Add DNS parameters for reference in other resources.
|
|
29
|
+
* Optionally includes a front-end live development subdomain.
|
|
30
|
+
*
|
|
31
|
+
* @param config - DNS configuration.
|
|
32
|
+
* @group Resource Packs
|
|
33
|
+
* */
|
|
34
|
+
export declare const addDNS: import("..").ResourcePackApplier<AddDNSConfig>;
|