@jaypie/constructs 1.1.43 → 1.1.45
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/JaypieLambda.d.ts +2 -2
- package/dist/cjs/JaypieQueuedLambda.d.ts +2 -1
- package/dist/cjs/index.cjs +38 -7
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/JaypieLambda.d.ts +2 -2
- package/dist/esm/JaypieQueuedLambda.d.ts +2 -1
- package/dist/esm/index.js +38 -7
- package/dist/esm/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -11,7 +11,6 @@ export interface JaypieLambdaProps {
|
|
|
11
11
|
allowPublicSubnet?: boolean;
|
|
12
12
|
architecture?: lambda.Architecture;
|
|
13
13
|
code: lambda.Code | string;
|
|
14
|
-
codeSigningConfig?: lambda.ICodeSigningConfig;
|
|
15
14
|
datadogApiKeyArn?: string;
|
|
16
15
|
deadLetterQueue?: import("aws-cdk-lib/aws-sqs").IQueue;
|
|
17
16
|
deadLetterQueueEnabled?: boolean;
|
|
@@ -20,7 +19,6 @@ export interface JaypieLambdaProps {
|
|
|
20
19
|
environment?: {
|
|
21
20
|
[key: string]: string;
|
|
22
21
|
};
|
|
23
|
-
environmentEncryption?: import("aws-cdk-lib/aws-kms").IKey;
|
|
24
22
|
envSecrets?: {
|
|
25
23
|
[key: string]: secretsmanager.ISecret;
|
|
26
24
|
};
|
|
@@ -75,6 +73,7 @@ export declare class JaypieLambda extends Construct implements lambda.IFunction
|
|
|
75
73
|
get latestVersion(): lambda.IVersion;
|
|
76
74
|
get permissionsNode(): import("constructs").Node;
|
|
77
75
|
get resourceArnsForGrantInvoke(): string[];
|
|
76
|
+
get functionRef(): lambda.FunctionRef;
|
|
78
77
|
addEventSource(source: lambda.IEventSource): void;
|
|
79
78
|
addEventSourceMapping(id: string, options: lambda.EventSourceMappingOptions): lambda.EventSourceMapping;
|
|
80
79
|
addFunctionUrl(options?: lambda.FunctionUrlOptions): lambda.FunctionUrl;
|
|
@@ -97,4 +96,5 @@ export declare class JaypieLambda extends Construct implements lambda.IFunction
|
|
|
97
96
|
};
|
|
98
97
|
get stack(): Stack;
|
|
99
98
|
applyRemovalPolicy(policy: RemovalPolicy): void;
|
|
99
|
+
addEnvironment(key: string, value: string): void;
|
|
100
100
|
}
|
|
@@ -17,7 +17,6 @@ export declare class JaypieQueuedLambda extends Construct implements lambda.IFun
|
|
|
17
17
|
constructor(scope: Construct, id: string, props: JaypieQueuedLambdaProps);
|
|
18
18
|
get queue(): sqs.Queue;
|
|
19
19
|
get lambda(): lambda.Function;
|
|
20
|
-
get code(): lambda.Code;
|
|
21
20
|
get functionArn(): string;
|
|
22
21
|
get functionName(): string;
|
|
23
22
|
get grantPrincipal(): import("aws-cdk-lib/aws-iam").IPrincipal;
|
|
@@ -28,6 +27,7 @@ export declare class JaypieQueuedLambda extends Construct implements lambda.IFun
|
|
|
28
27
|
get latestVersion(): lambda.IVersion;
|
|
29
28
|
get permissionsNode(): import("constructs").Node;
|
|
30
29
|
get resourceArnsForGrantInvoke(): string[];
|
|
30
|
+
get functionRef(): lambda.FunctionRef;
|
|
31
31
|
addEventSource(source: lambda.IEventSource): void;
|
|
32
32
|
addEventSourceMapping(id: string, options: lambda.EventSourceMappingOptions): lambda.EventSourceMapping;
|
|
33
33
|
addFunctionUrl(options?: lambda.FunctionUrlOptions): lambda.FunctionUrl;
|
|
@@ -69,4 +69,5 @@ export declare class JaypieQueuedLambda extends Construct implements lambda.IFun
|
|
|
69
69
|
metricNumberOfMessagesReceived(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
|
|
70
70
|
metricNumberOfMessagesSent(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
|
|
71
71
|
metricSentMessageSize(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
|
|
72
|
+
addEnvironment(key: string, value: string): void;
|
|
72
73
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -446,7 +446,7 @@ class JaypieAppStack extends JaypieStack {
|
|
|
446
446
|
class JaypieLambda extends Construct {
|
|
447
447
|
constructor(scope, id, props) {
|
|
448
448
|
super(scope, id);
|
|
449
|
-
const { allowAllOutbound, allowPublicSubnet, architecture = lambda.Architecture.X86_64, code,
|
|
449
|
+
const { allowAllOutbound, allowPublicSubnet, architecture = lambda.Architecture.X86_64, code, datadogApiKeyArn, deadLetterQueue, deadLetterQueueEnabled, deadLetterTopic, description, environment: initialEnvironment = {}, envSecrets = {}, ephemeralStorageSize, filesystem, handler = "index.handler", initialPolicy, layers = [], logRetention = CDK$2.LAMBDA.LOG_RETENTION, logRetentionRole, logRetentionRetryOptions, maxEventAge, memorySize = CDK$2.LAMBDA.MEMORY_SIZE, paramsAndSecrets, paramsAndSecretsOptions, profiling, profilingGroup, provisionedConcurrentExecutions, reservedConcurrentExecutions, retryAttempts, roleTag = CDK$2.ROLE.PROCESSING, runtime = lambda.Runtime.NODEJS_22_X, runtimeManagementMode, secrets = [], securityGroups, timeout = Duration.seconds(CDK$2.DURATION.LAMBDA_WORKER), tracing, vendorTag, vpc, vpcSubnets, } = props;
|
|
450
450
|
// Get base environment with defaults
|
|
451
451
|
const environment = jaypieLambdaEnv({ initialEnvironment });
|
|
452
452
|
const codeAsset = typeof code === "string" ? lambda.Code.fromAsset(code) : code;
|
|
@@ -477,7 +477,6 @@ class JaypieLambda extends Construct {
|
|
|
477
477
|
allowPublicSubnet,
|
|
478
478
|
architecture,
|
|
479
479
|
code: codeAsset,
|
|
480
|
-
codeSigningConfig,
|
|
481
480
|
deadLetterQueue,
|
|
482
481
|
deadLetterQueueEnabled,
|
|
483
482
|
deadLetterTopic,
|
|
@@ -487,7 +486,6 @@ class JaypieLambda extends Construct {
|
|
|
487
486
|
...secretsEnvironment,
|
|
488
487
|
...jaypieSecretsEnvironment,
|
|
489
488
|
},
|
|
490
|
-
environmentEncryption,
|
|
491
489
|
ephemeralStorageSize,
|
|
492
490
|
filesystem,
|
|
493
491
|
handler,
|
|
@@ -592,6 +590,9 @@ class JaypieLambda extends Construct {
|
|
|
592
590
|
get resourceArnsForGrantInvoke() {
|
|
593
591
|
return this._reference.resourceArnsForGrantInvoke;
|
|
594
592
|
}
|
|
593
|
+
get functionRef() {
|
|
594
|
+
return this._reference.functionRef;
|
|
595
|
+
}
|
|
595
596
|
addEventSource(source) {
|
|
596
597
|
this._reference.addEventSource(source);
|
|
597
598
|
}
|
|
@@ -652,12 +653,15 @@ class JaypieLambda extends Construct {
|
|
|
652
653
|
applyRemovalPolicy(policy) {
|
|
653
654
|
this._reference.applyRemovalPolicy(policy);
|
|
654
655
|
}
|
|
656
|
+
addEnvironment(key, value) {
|
|
657
|
+
this._lambda.addEnvironment(key, value);
|
|
658
|
+
}
|
|
655
659
|
}
|
|
656
660
|
|
|
657
661
|
class JaypieQueuedLambda extends Construct {
|
|
658
662
|
constructor(scope, id, props) {
|
|
659
663
|
super(scope, id);
|
|
660
|
-
const { batchSize = 1, code, environment = {}, envSecrets = {}, fifo = true, handler = "index.handler", layers = [], logRetention = CDK$2.LAMBDA.LOG_RETENTION, memorySize = CDK$2.LAMBDA.MEMORY_SIZE, paramsAndSecrets, reservedConcurrentExecutions, roleTag, runtime = lambda.Runtime.NODEJS_22_X, secrets = [], timeout = Duration.seconds(CDK$2.DURATION.LAMBDA_WORKER), vendorTag, visibilityTimeout = Duration.seconds(CDK$2.DURATION.LAMBDA_WORKER), } = props;
|
|
664
|
+
const { allowAllOutbound, allowPublicSubnet, architecture, batchSize = 1, code, datadogApiKeyArn, deadLetterQueue, deadLetterQueueEnabled, deadLetterTopic, description, environment = {}, envSecrets = {}, ephemeralStorageSize, fifo = true, filesystem, handler = "index.handler", initialPolicy, layers = [], logRetention = CDK$2.LAMBDA.LOG_RETENTION, logRetentionRole, logRetentionRetryOptions, maxEventAge, memorySize = CDK$2.LAMBDA.MEMORY_SIZE, paramsAndSecrets, paramsAndSecretsOptions, profiling, profilingGroup, provisionedConcurrentExecutions, reservedConcurrentExecutions, retryAttempts, roleTag, runtime = lambda.Runtime.NODEJS_22_X, runtimeManagementMode, secrets = [], securityGroups, timeout = Duration.seconds(CDK$2.DURATION.LAMBDA_WORKER), tracing, vendorTag, visibilityTimeout = Duration.seconds(CDK$2.DURATION.LAMBDA_WORKER), vpc, vpcSubnets, } = props;
|
|
661
665
|
// Create SQS Queue
|
|
662
666
|
this._queue = new sqs.Queue(this, "Queue", {
|
|
663
667
|
fifo,
|
|
@@ -673,23 +677,47 @@ class JaypieQueuedLambda extends Construct {
|
|
|
673
677
|
}
|
|
674
678
|
// Create Lambda with JaypieLambda
|
|
675
679
|
this._lambdaConstruct = new JaypieLambda(this, "Function", {
|
|
680
|
+
allowAllOutbound,
|
|
681
|
+
allowPublicSubnet,
|
|
682
|
+
architecture,
|
|
676
683
|
code,
|
|
684
|
+
datadogApiKeyArn,
|
|
685
|
+
deadLetterQueue,
|
|
686
|
+
deadLetterQueueEnabled,
|
|
687
|
+
deadLetterTopic,
|
|
688
|
+
description,
|
|
677
689
|
environment: {
|
|
678
690
|
...environment,
|
|
679
691
|
CDK_ENV_QUEUE_URL: this._queue.queueUrl,
|
|
680
692
|
},
|
|
681
693
|
envSecrets,
|
|
694
|
+
ephemeralStorageSize,
|
|
695
|
+
filesystem,
|
|
682
696
|
handler,
|
|
697
|
+
initialPolicy,
|
|
683
698
|
layers,
|
|
684
699
|
logRetention,
|
|
700
|
+
logRetentionRole,
|
|
701
|
+
logRetentionRetryOptions,
|
|
702
|
+
maxEventAge,
|
|
685
703
|
memorySize,
|
|
686
704
|
paramsAndSecrets,
|
|
705
|
+
paramsAndSecretsOptions,
|
|
706
|
+
profiling,
|
|
707
|
+
profilingGroup,
|
|
708
|
+
provisionedConcurrentExecutions,
|
|
687
709
|
reservedConcurrentExecutions,
|
|
710
|
+
retryAttempts,
|
|
688
711
|
roleTag,
|
|
689
712
|
runtime,
|
|
713
|
+
runtimeManagementMode,
|
|
690
714
|
secrets,
|
|
715
|
+
securityGroups,
|
|
691
716
|
timeout,
|
|
717
|
+
tracing,
|
|
692
718
|
vendorTag,
|
|
719
|
+
vpc,
|
|
720
|
+
vpcSubnets,
|
|
693
721
|
});
|
|
694
722
|
// Set up queue and lambda integration
|
|
695
723
|
this._queue.grantConsumeMessages(this._lambdaConstruct);
|
|
@@ -705,9 +733,6 @@ class JaypieQueuedLambda extends Construct {
|
|
|
705
733
|
get lambda() {
|
|
706
734
|
return this._lambdaConstruct.lambda;
|
|
707
735
|
}
|
|
708
|
-
get code() {
|
|
709
|
-
return this._lambdaConstruct.code;
|
|
710
|
-
}
|
|
711
736
|
// IFunction implementation
|
|
712
737
|
get functionArn() {
|
|
713
738
|
return this._lambdaConstruct.functionArn;
|
|
@@ -739,6 +764,9 @@ class JaypieQueuedLambda extends Construct {
|
|
|
739
764
|
get resourceArnsForGrantInvoke() {
|
|
740
765
|
return this._lambdaConstruct.resourceArnsForGrantInvoke;
|
|
741
766
|
}
|
|
767
|
+
get functionRef() {
|
|
768
|
+
return this._lambdaConstruct.functionRef;
|
|
769
|
+
}
|
|
742
770
|
addEventSource(source) {
|
|
743
771
|
this._lambdaConstruct.addEventSource(source);
|
|
744
772
|
}
|
|
@@ -860,6 +888,9 @@ class JaypieQueuedLambda extends Construct {
|
|
|
860
888
|
metricSentMessageSize(props) {
|
|
861
889
|
return this._queue.metricSentMessageSize(props);
|
|
862
890
|
}
|
|
891
|
+
addEnvironment(key, value) {
|
|
892
|
+
this._lambdaConstruct.addEnvironment(key, value);
|
|
893
|
+
}
|
|
863
894
|
}
|
|
864
895
|
|
|
865
896
|
class JaypieBucketQueuedLambda extends JaypieQueuedLambda {
|