@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/cjs/index.cjs
CHANGED
|
@@ -478,7 +478,7 @@ class JaypieAppStack extends JaypieStack {
|
|
|
478
478
|
class JaypieLambda extends constructs.Construct {
|
|
479
479
|
constructor(scope, id, props) {
|
|
480
480
|
super(scope, id);
|
|
481
|
-
const { allowAllOutbound, allowPublicSubnet, architecture = lambda__namespace.Architecture.X86_64, code,
|
|
481
|
+
const { allowAllOutbound, allowPublicSubnet, architecture = lambda__namespace.Architecture.X86_64, code, datadogApiKeyArn, deadLetterQueue, deadLetterQueueEnabled, deadLetterTopic, description, environment: initialEnvironment = {}, envSecrets = {}, ephemeralStorageSize, filesystem, handler = "index.handler", initialPolicy, layers = [], logRetention = cdk.CDK.LAMBDA.LOG_RETENTION, logRetentionRole, logRetentionRetryOptions, maxEventAge, memorySize = cdk.CDK.LAMBDA.MEMORY_SIZE, paramsAndSecrets, paramsAndSecretsOptions, profiling, profilingGroup, provisionedConcurrentExecutions, reservedConcurrentExecutions, retryAttempts, roleTag = cdk.CDK.ROLE.PROCESSING, runtime = lambda__namespace.Runtime.NODEJS_22_X, runtimeManagementMode, secrets = [], securityGroups, timeout = cdk$1.Duration.seconds(cdk.CDK.DURATION.LAMBDA_WORKER), tracing, vendorTag, vpc, vpcSubnets, } = props;
|
|
482
482
|
// Get base environment with defaults
|
|
483
483
|
const environment = jaypieLambdaEnv({ initialEnvironment });
|
|
484
484
|
const codeAsset = typeof code === "string" ? lambda__namespace.Code.fromAsset(code) : code;
|
|
@@ -509,7 +509,6 @@ class JaypieLambda extends constructs.Construct {
|
|
|
509
509
|
allowPublicSubnet,
|
|
510
510
|
architecture,
|
|
511
511
|
code: codeAsset,
|
|
512
|
-
codeSigningConfig,
|
|
513
512
|
deadLetterQueue,
|
|
514
513
|
deadLetterQueueEnabled,
|
|
515
514
|
deadLetterTopic,
|
|
@@ -519,7 +518,6 @@ class JaypieLambda extends constructs.Construct {
|
|
|
519
518
|
...secretsEnvironment,
|
|
520
519
|
...jaypieSecretsEnvironment,
|
|
521
520
|
},
|
|
522
|
-
environmentEncryption,
|
|
523
521
|
ephemeralStorageSize,
|
|
524
522
|
filesystem,
|
|
525
523
|
handler,
|
|
@@ -624,6 +622,9 @@ class JaypieLambda extends constructs.Construct {
|
|
|
624
622
|
get resourceArnsForGrantInvoke() {
|
|
625
623
|
return this._reference.resourceArnsForGrantInvoke;
|
|
626
624
|
}
|
|
625
|
+
get functionRef() {
|
|
626
|
+
return this._reference.functionRef;
|
|
627
|
+
}
|
|
627
628
|
addEventSource(source) {
|
|
628
629
|
this._reference.addEventSource(source);
|
|
629
630
|
}
|
|
@@ -684,12 +685,15 @@ class JaypieLambda extends constructs.Construct {
|
|
|
684
685
|
applyRemovalPolicy(policy) {
|
|
685
686
|
this._reference.applyRemovalPolicy(policy);
|
|
686
687
|
}
|
|
688
|
+
addEnvironment(key, value) {
|
|
689
|
+
this._lambda.addEnvironment(key, value);
|
|
690
|
+
}
|
|
687
691
|
}
|
|
688
692
|
|
|
689
693
|
class JaypieQueuedLambda extends constructs.Construct {
|
|
690
694
|
constructor(scope, id, props) {
|
|
691
695
|
super(scope, id);
|
|
692
|
-
const { batchSize = 1, code, environment = {}, envSecrets = {}, fifo = true, handler = "index.handler", layers = [], logRetention = cdk.CDK.LAMBDA.LOG_RETENTION, memorySize = cdk.CDK.LAMBDA.MEMORY_SIZE, paramsAndSecrets, reservedConcurrentExecutions, roleTag, runtime = lambda__namespace.Runtime.NODEJS_22_X, secrets = [], timeout = cdk$1.Duration.seconds(cdk.CDK.DURATION.LAMBDA_WORKER), vendorTag, visibilityTimeout = cdk$1.Duration.seconds(cdk.CDK.DURATION.LAMBDA_WORKER), } = props;
|
|
696
|
+
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.CDK.LAMBDA.LOG_RETENTION, logRetentionRole, logRetentionRetryOptions, maxEventAge, memorySize = cdk.CDK.LAMBDA.MEMORY_SIZE, paramsAndSecrets, paramsAndSecretsOptions, profiling, profilingGroup, provisionedConcurrentExecutions, reservedConcurrentExecutions, retryAttempts, roleTag, runtime = lambda__namespace.Runtime.NODEJS_22_X, runtimeManagementMode, secrets = [], securityGroups, timeout = cdk$1.Duration.seconds(cdk.CDK.DURATION.LAMBDA_WORKER), tracing, vendorTag, visibilityTimeout = cdk$1.Duration.seconds(cdk.CDK.DURATION.LAMBDA_WORKER), vpc, vpcSubnets, } = props;
|
|
693
697
|
// Create SQS Queue
|
|
694
698
|
this._queue = new sqs__namespace.Queue(this, "Queue", {
|
|
695
699
|
fifo,
|
|
@@ -705,23 +709,47 @@ class JaypieQueuedLambda extends constructs.Construct {
|
|
|
705
709
|
}
|
|
706
710
|
// Create Lambda with JaypieLambda
|
|
707
711
|
this._lambdaConstruct = new JaypieLambda(this, "Function", {
|
|
712
|
+
allowAllOutbound,
|
|
713
|
+
allowPublicSubnet,
|
|
714
|
+
architecture,
|
|
708
715
|
code,
|
|
716
|
+
datadogApiKeyArn,
|
|
717
|
+
deadLetterQueue,
|
|
718
|
+
deadLetterQueueEnabled,
|
|
719
|
+
deadLetterTopic,
|
|
720
|
+
description,
|
|
709
721
|
environment: {
|
|
710
722
|
...environment,
|
|
711
723
|
CDK_ENV_QUEUE_URL: this._queue.queueUrl,
|
|
712
724
|
},
|
|
713
725
|
envSecrets,
|
|
726
|
+
ephemeralStorageSize,
|
|
727
|
+
filesystem,
|
|
714
728
|
handler,
|
|
729
|
+
initialPolicy,
|
|
715
730
|
layers,
|
|
716
731
|
logRetention,
|
|
732
|
+
logRetentionRole,
|
|
733
|
+
logRetentionRetryOptions,
|
|
734
|
+
maxEventAge,
|
|
717
735
|
memorySize,
|
|
718
736
|
paramsAndSecrets,
|
|
737
|
+
paramsAndSecretsOptions,
|
|
738
|
+
profiling,
|
|
739
|
+
profilingGroup,
|
|
740
|
+
provisionedConcurrentExecutions,
|
|
719
741
|
reservedConcurrentExecutions,
|
|
742
|
+
retryAttempts,
|
|
720
743
|
roleTag,
|
|
721
744
|
runtime,
|
|
745
|
+
runtimeManagementMode,
|
|
722
746
|
secrets,
|
|
747
|
+
securityGroups,
|
|
723
748
|
timeout,
|
|
749
|
+
tracing,
|
|
724
750
|
vendorTag,
|
|
751
|
+
vpc,
|
|
752
|
+
vpcSubnets,
|
|
725
753
|
});
|
|
726
754
|
// Set up queue and lambda integration
|
|
727
755
|
this._queue.grantConsumeMessages(this._lambdaConstruct);
|
|
@@ -737,9 +765,6 @@ class JaypieQueuedLambda extends constructs.Construct {
|
|
|
737
765
|
get lambda() {
|
|
738
766
|
return this._lambdaConstruct.lambda;
|
|
739
767
|
}
|
|
740
|
-
get code() {
|
|
741
|
-
return this._lambdaConstruct.code;
|
|
742
|
-
}
|
|
743
768
|
// IFunction implementation
|
|
744
769
|
get functionArn() {
|
|
745
770
|
return this._lambdaConstruct.functionArn;
|
|
@@ -771,6 +796,9 @@ class JaypieQueuedLambda extends constructs.Construct {
|
|
|
771
796
|
get resourceArnsForGrantInvoke() {
|
|
772
797
|
return this._lambdaConstruct.resourceArnsForGrantInvoke;
|
|
773
798
|
}
|
|
799
|
+
get functionRef() {
|
|
800
|
+
return this._lambdaConstruct.functionRef;
|
|
801
|
+
}
|
|
774
802
|
addEventSource(source) {
|
|
775
803
|
this._lambdaConstruct.addEventSource(source);
|
|
776
804
|
}
|
|
@@ -892,6 +920,9 @@ class JaypieQueuedLambda extends constructs.Construct {
|
|
|
892
920
|
metricSentMessageSize(props) {
|
|
893
921
|
return this._queue.metricSentMessageSize(props);
|
|
894
922
|
}
|
|
923
|
+
addEnvironment(key, value) {
|
|
924
|
+
this._lambdaConstruct.addEnvironment(key, value);
|
|
925
|
+
}
|
|
895
926
|
}
|
|
896
927
|
|
|
897
928
|
class JaypieBucketQueuedLambda extends JaypieQueuedLambda {
|