@jaypie/constructs 1.1.28 → 1.1.29
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/dist/cjs/JaypieApiGateway.d.ts +46 -0
- package/dist/cjs/JaypieAppStack.d.ts +5 -0
- package/dist/cjs/JaypieInfrastructureStack.d.ts +5 -0
- package/dist/cjs/JaypieStack.d.ts +8 -0
- package/dist/cjs/JaypieWebDeploymentBucket.d.ts +81 -0
- package/dist/cjs/helpers/constructEnvName.d.ts +5 -0
- package/dist/cjs/helpers/constructStackName.d.ts +1 -0
- package/dist/cjs/helpers/index.d.ts +4 -0
- package/dist/cjs/helpers/isEnv.d.ts +12 -0
- package/dist/cjs/helpers/stackTagger.d.ts +4 -0
- package/dist/cjs/index.cjs +543 -5
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.ts +6 -0
- package/dist/esm/JaypieApiGateway.d.ts +46 -0
- package/dist/esm/JaypieAppStack.d.ts +5 -0
- package/dist/esm/JaypieInfrastructureStack.d.ts +5 -0
- package/dist/esm/JaypieStack.d.ts +8 -0
- package/dist/esm/JaypieWebDeploymentBucket.d.ts +81 -0
- package/dist/esm/helpers/constructEnvName.d.ts +5 -0
- package/dist/esm/helpers/constructStackName.d.ts +1 -0
- package/dist/esm/helpers/index.d.ts +4 -0
- package/dist/esm/helpers/isEnv.d.ts +12 -0
- package/dist/esm/helpers/stackTagger.d.ts +4 -0
- package/dist/esm/index.d.ts +6 -0
- package/dist/esm/index.js +568 -46
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Stack, StackProps } from "aws-cdk-lib";
|
|
2
|
+
import { Construct } from "constructs";
|
|
3
|
+
export interface JaypieStackProps extends StackProps {
|
|
4
|
+
key?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class JaypieStack extends Stack {
|
|
7
|
+
constructor(scope: Construct, id: string, props?: JaypieStackProps);
|
|
8
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { RemovalPolicy } from "aws-cdk-lib";
|
|
2
|
+
import * as acm from "aws-cdk-lib/aws-certificatemanager";
|
|
3
|
+
import * as cloudfront from "aws-cdk-lib/aws-cloudfront";
|
|
4
|
+
import { AddToResourcePolicyResult, PolicyStatement } from "aws-cdk-lib/aws-iam";
|
|
5
|
+
import * as route53 from "aws-cdk-lib/aws-route53";
|
|
6
|
+
import * as s3 from "aws-cdk-lib/aws-s3";
|
|
7
|
+
import * as kms from "aws-cdk-lib/aws-kms";
|
|
8
|
+
import { Construct } from "constructs";
|
|
9
|
+
export interface JaypieWebDeploymentBucketProps extends s3.BucketProps {
|
|
10
|
+
/**
|
|
11
|
+
* SSL certificate for the CloudFront distribution
|
|
12
|
+
* @default true (creates a new certificate)
|
|
13
|
+
*/
|
|
14
|
+
certificate?: boolean | acm.ICertificate;
|
|
15
|
+
/**
|
|
16
|
+
* The domain name for the website
|
|
17
|
+
* @default mergeDomain(CDK_ENV_WEB_SUBDOMAIN, CDK_ENV_WEB_HOSTED_ZONE || CDK_ENV_HOSTED_ZONE)
|
|
18
|
+
*/
|
|
19
|
+
host?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Optional bucket name
|
|
22
|
+
*/
|
|
23
|
+
name?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Role tag for tagging resources
|
|
26
|
+
* @default CDK.ROLE.HOSTING
|
|
27
|
+
*/
|
|
28
|
+
roleTag?: string;
|
|
29
|
+
/**
|
|
30
|
+
* The hosted zone for DNS records
|
|
31
|
+
* @default CDK_ENV_WEB_HOSTED_ZONE || CDK_ENV_HOSTED_ZONE
|
|
32
|
+
*/
|
|
33
|
+
zone?: string | route53.IHostedZone;
|
|
34
|
+
}
|
|
35
|
+
export declare class JaypieWebDeploymentBucket extends Construct implements s3.IBucket {
|
|
36
|
+
readonly bucket: s3.Bucket;
|
|
37
|
+
readonly bucketArn: string;
|
|
38
|
+
readonly bucketDomainName: string;
|
|
39
|
+
readonly bucketDualStackDomainName: string;
|
|
40
|
+
readonly bucketName: string;
|
|
41
|
+
readonly bucketRegionalDomainName: string;
|
|
42
|
+
readonly bucketWebsiteDomainName: string;
|
|
43
|
+
readonly bucketWebsiteUrl: string;
|
|
44
|
+
readonly encryptionKey?: kms.IKey;
|
|
45
|
+
readonly isWebsite?: boolean;
|
|
46
|
+
readonly notificationsHandlerRole?: string;
|
|
47
|
+
readonly policy?: s3.BucketPolicy;
|
|
48
|
+
readonly deployRoleArn?: string;
|
|
49
|
+
readonly distributionDomainName?: string;
|
|
50
|
+
readonly certificate?: acm.ICertificate;
|
|
51
|
+
readonly distribution?: cloudfront.Distribution;
|
|
52
|
+
constructor(scope: Construct, id: string, props?: JaypieWebDeploymentBucketProps);
|
|
53
|
+
addEventNotification(event: s3.EventType, dest: s3.IBucketNotificationDestination, ...filters: s3.NotificationKeyFilter[]): void;
|
|
54
|
+
addObjectCreatedNotification(dest: s3.IBucketNotificationDestination, ...filters: s3.NotificationKeyFilter[]): void;
|
|
55
|
+
addObjectRemovedNotification(dest: s3.IBucketNotificationDestination, ...filters: s3.NotificationKeyFilter[]): void;
|
|
56
|
+
addToResourcePolicy(permission: PolicyStatement): AddToResourcePolicyResult;
|
|
57
|
+
arnForObjects(keyPattern: string): string;
|
|
58
|
+
grantDelete(identity: any, objectsKeyPattern?: any): any;
|
|
59
|
+
grantPublicAccess(allowedActions: string, keyPrefix?: string): any;
|
|
60
|
+
grantPut(identity: any, objectsKeyPattern?: any): any;
|
|
61
|
+
grantPutAcl(identity: any, objectsKeyPattern?: string): any;
|
|
62
|
+
grantRead(identity: any, objectsKeyPattern?: any): any;
|
|
63
|
+
grantReadWrite(identity: any, objectsKeyPattern?: any): any;
|
|
64
|
+
grantWrite(identity: any, objectsKeyPattern?: any): any;
|
|
65
|
+
s3UrlForObject(key?: string): string;
|
|
66
|
+
urlForObject(key?: string): string;
|
|
67
|
+
virtualHostedUrlForObject(key?: string, options?: s3.VirtualHostedStyleUrlOptions): string;
|
|
68
|
+
transferAccelerationUrlForObject(key?: string): string;
|
|
69
|
+
onCloudTrailEvent(id: string, options?: s3.OnCloudTrailBucketEventOptions): any;
|
|
70
|
+
onCloudTrailPutObject(id: string, options?: s3.OnCloudTrailBucketEventOptions): any;
|
|
71
|
+
onCloudTrailWriteObject(id: string, options?: s3.OnCloudTrailBucketEventOptions): any;
|
|
72
|
+
addCorsRule(rule: s3.CorsRule): void;
|
|
73
|
+
addInventory(inventory: s3.Inventory): void;
|
|
74
|
+
addLifecycleRule(rule: s3.LifecycleRule): void;
|
|
75
|
+
addMetric(metric: s3.BucketMetrics): void;
|
|
76
|
+
enableEventBridgeNotification(): void;
|
|
77
|
+
addReplicationPolicy(policy: any): void;
|
|
78
|
+
get stack(): any;
|
|
79
|
+
get env(): any;
|
|
80
|
+
applyRemovalPolicy(policy: RemovalPolicy): void;
|
|
81
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function constructStackName(key?: string): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check if the current environment matches the given environment
|
|
3
|
+
*/
|
|
4
|
+
export declare function isEnv(env: string): boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Check if the current environment is production
|
|
7
|
+
*/
|
|
8
|
+
export declare function isProductionEnv(): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Check if the current environment is sandbox
|
|
11
|
+
*/
|
|
12
|
+
export declare function isSandboxEnv(): boolean;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
|
+
export { JaypieApiGateway } from "./JaypieApiGateway";
|
|
2
|
+
export { JaypieAppStack } from "./JaypieAppStack";
|
|
1
3
|
export { JaypieBucketQueuedLambda } from "./JaypieBucketQueuedLambda";
|
|
2
4
|
export { JaypieDatadogSecret } from "./JaypieDatadogSecret";
|
|
3
5
|
export { JaypieEnvSecret } from "./JaypieEnvSecret";
|
|
4
6
|
export { JaypieExpressLambda } from "./JaypieExpressLambda";
|
|
5
7
|
export { JaypieHostedZone } from "./JaypieHostedZone";
|
|
8
|
+
export { JaypieInfrastructureStack } from "./JaypieInfrastructureStack";
|
|
6
9
|
export { JaypieLambda } from "./JaypieLambda";
|
|
7
10
|
export { JaypieMongoDbSecret } from "./JaypieMongoDbSecret";
|
|
8
11
|
export { JaypieOpenAiSecret } from "./JaypieOpenAiSecret";
|
|
9
12
|
export { JaypieQueuedLambda } from "./JaypieQueuedLambda";
|
|
10
13
|
export { JaypieSsoAccountMap, JaypieSsoGroups, JaypieSsoGroupMap, JaypieSsoGroupsProps, PermissionSetType, } from "./JaypieSsoGroups";
|
|
14
|
+
export { JaypieStack, JaypieStackProps } from "./JaypieStack";
|
|
11
15
|
export { JaypieTraceSigningKeySecret } from "./JaypieTraceSigningKeySecret";
|
|
16
|
+
export { JaypieWebDeploymentBucket } from "./JaypieWebDeploymentBucket";
|
|
17
|
+
export * from "./helpers";
|