@fy-stack/app-construct 0.0.147-alpha.3060 → 0.0.147-alpha.30610
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/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -5
- package/dist/lib/ecs/apps/image-app-construct.js +1 -1
- package/dist/lib/ecs/apps/next-app-router-construct.d.ts.map +1 -1
- package/dist/lib/ecs/apps/next-app-router-construct.js +13 -16
- package/dist/lib/ecs/apps/task-construct.js +1 -1
- package/dist/lib/ecs/shared/taskDefinitionImage.d.ts.map +1 -1
- package/dist/lib/ecs/shared/taskDefinitionImage.js +2 -3
- package/dist/lib/ecs/types.d.ts +1 -0
- package/dist/lib/ecs/types.d.ts.map +1 -1
- package/dist/lib/lambda/apps/image-app-construct.d.ts +9 -43
- package/dist/lib/lambda/apps/image-app-construct.d.ts.map +1 -1
- package/dist/lib/lambda/apps/image-app-construct.js +15 -17
- package/dist/lib/lambda/apps/next-app-router-construct.d.ts +6 -9
- package/dist/lib/lambda/apps/next-app-router-construct.d.ts.map +1 -1
- package/dist/lib/lambda/apps/next-app-router-construct.js +35 -13
- package/dist/lib/lambda/apps/node-api-construct.d.ts +2 -13
- package/dist/lib/lambda/apps/node-api-construct.d.ts.map +1 -1
- package/dist/lib/lambda/apps/node-api-construct.js +3 -5
- package/dist/lib/lambda/apps/node-app-construct.d.ts +2 -13
- package/dist/lib/lambda/apps/node-app-construct.d.ts.map +1 -1
- package/dist/lib/lambda/apps/node-app-construct.js +1 -5
- package/dist/lib/lambda/types.d.ts +3 -1
- package/dist/lib/lambda/types.d.ts.map +1 -1
- package/dist/lib/lambda/utils/lambda-attach.js +1 -1
- package/dist/lib/shared/code-deployment.d.ts +4 -0
- package/dist/lib/shared/code-deployment.d.ts.map +1 -0
- package/dist/lib/shared/code-deployment.js +21 -0
- package/dist/lib/shared/code-from-param.d.ts +6 -0
- package/dist/lib/shared/code-from-param.d.ts.map +1 -0
- package/dist/lib/shared/code-from-param.js +11 -0
- package/dist/lib/shared/container-from-param.d.ts +7 -0
- package/dist/lib/shared/container-from-param.d.ts.map +1 -0
- package/dist/lib/shared/container-from-param.js +12 -0
- package/dist/lib/shared/container.d.ts +6 -0
- package/dist/lib/shared/container.d.ts.map +1 -0
- package/dist/lib/shared/container.js +11 -0
- package/dist/lib/shared/next-app-router.d.ts +12 -3
- package/dist/lib/shared/next-app-router.d.ts.map +1 -1
- package/dist/lib/shared/next-app-router.js +41 -46
- package/dist/lib/shared/params-from-attachable.d.ts +5 -0
- package/dist/lib/shared/params-from-attachable.d.ts.map +1 -0
- package/dist/lib/shared/params-from-attachable.js +11 -0
- package/dist/lib/shared/public-bucket.d.ts +4 -0
- package/dist/lib/shared/public-bucket.d.ts.map +1 -0
- package/dist/lib/shared/public-bucket.js +23 -0
- package/dist/lib/standalone/image-app-container.d.ts +6 -2
- package/dist/lib/standalone/image-app-container.d.ts.map +1 -1
- package/dist/lib/standalone/image-app-container.js +17 -7
- package/dist/lib/standalone/next-app-router-code.d.ts +9 -0
- package/dist/lib/standalone/next-app-router-code.d.ts.map +1 -0
- package/dist/lib/standalone/next-app-router-code.js +53 -0
- package/dist/lib/standalone/next-app-router-container.d.ts +5 -2
- package/dist/lib/standalone/next-app-router-container.d.ts.map +1 -1
- package/dist/lib/standalone/next-app-router-container.js +29 -16
- package/dist/lib/standalone/types.d.ts +1 -3
- package/dist/lib/standalone/types.d.ts.map +1 -1
- package/dist/lib/static/apps/next-pages-export-construct.d.ts +2 -5
- package/dist/lib/static/apps/next-pages-export-construct.d.ts.map +1 -1
- package/dist/lib/static/apps/next-pages-export-construct.js +1 -3
- package/dist/lib/static/apps/static-website-construct.d.ts +3 -7
- package/dist/lib/static/apps/static-website-construct.d.ts.map +1 -1
- package/dist/lib/static/apps/static-website-construct.js +2 -1
- package/dist/lib/static/types.d.ts +1 -1
- package/dist/lib/static/types.d.ts.map +1 -1
- package/dist/lib/util/constants.d.ts +3 -23
- package/dist/lib/util/constants.d.ts.map +1 -1
- package/dist/lib/util/public-bucket.d.ts +4 -0
- package/dist/lib/util/public-bucket.d.ts.map +1 -0
- package/dist/lib/util/public-bucket.js +23 -0
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
export { ImageAppContainer } from './lib/standalone/image-app-container';
|
|
2
|
-
export { NextAppRouterContainer } from './lib/standalone/next-app-router-container';
|
|
3
1
|
export { EcsConstruct } from './lib/ecs/ecs-construct';
|
|
4
2
|
export type { EcsConstructProps } from './lib/ecs/types';
|
|
5
3
|
export { LambdaConstruct } from './lib/lambda/lambda-construct';
|
|
6
4
|
export type { LambdaConstructProps } from './lib/lambda/types';
|
|
7
5
|
export { lambdaAttach } from './lib/lambda/utils/lambda-attach';
|
|
8
6
|
export { lambdaGrant } from './lib/lambda/utils/lambda-grant';
|
|
7
|
+
export { ImageAppContainer } from './lib/standalone/image-app-container';
|
|
8
|
+
export { NextAppRouterCode } from './lib/standalone/next-app-router-code';
|
|
9
|
+
export { NextAppRouterContainer } from './lib/standalone/next-app-router-container';
|
|
9
10
|
export { StaticConstruct } from './lib/static/static-construct';
|
|
10
11
|
export type { StaticConstructProps } from './lib/static/types';
|
|
11
12
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AACpF,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StaticConstruct = exports.
|
|
4
|
-
var image_app_container_1 = require("./lib/standalone/image-app-container");
|
|
5
|
-
Object.defineProperty(exports, "ImageAppContainer", { enumerable: true, get: function () { return image_app_container_1.ImageAppContainer; } });
|
|
6
|
-
var next_app_router_container_1 = require("./lib/standalone/next-app-router-container");
|
|
7
|
-
Object.defineProperty(exports, "NextAppRouterContainer", { enumerable: true, get: function () { return next_app_router_container_1.NextAppRouterContainer; } });
|
|
3
|
+
exports.StaticConstruct = exports.NextAppRouterContainer = exports.NextAppRouterCode = exports.ImageAppContainer = exports.lambdaGrant = exports.lambdaAttach = exports.LambdaConstruct = exports.EcsConstruct = void 0;
|
|
8
4
|
var ecs_construct_1 = require("./lib/ecs/ecs-construct");
|
|
9
5
|
Object.defineProperty(exports, "EcsConstruct", { enumerable: true, get: function () { return ecs_construct_1.EcsConstruct; } });
|
|
10
6
|
var lambda_construct_1 = require("./lib/lambda/lambda-construct");
|
|
@@ -13,5 +9,11 @@ var lambda_attach_1 = require("./lib/lambda/utils/lambda-attach");
|
|
|
13
9
|
Object.defineProperty(exports, "lambdaAttach", { enumerable: true, get: function () { return lambda_attach_1.lambdaAttach; } });
|
|
14
10
|
var lambda_grant_1 = require("./lib/lambda/utils/lambda-grant");
|
|
15
11
|
Object.defineProperty(exports, "lambdaGrant", { enumerable: true, get: function () { return lambda_grant_1.lambdaGrant; } });
|
|
12
|
+
var image_app_container_1 = require("./lib/standalone/image-app-container");
|
|
13
|
+
Object.defineProperty(exports, "ImageAppContainer", { enumerable: true, get: function () { return image_app_container_1.ImageAppContainer; } });
|
|
14
|
+
var next_app_router_code_1 = require("./lib/standalone/next-app-router-code");
|
|
15
|
+
Object.defineProperty(exports, "NextAppRouterCode", { enumerable: true, get: function () { return next_app_router_code_1.NextAppRouterCode; } });
|
|
16
|
+
var next_app_router_container_1 = require("./lib/standalone/next-app-router-container");
|
|
17
|
+
Object.defineProperty(exports, "NextAppRouterContainer", { enumerable: true, get: function () { return next_app_router_container_1.NextAppRouterContainer; } });
|
|
16
18
|
var static_construct_1 = require("./lib/static/static-construct");
|
|
17
19
|
Object.defineProperty(exports, "StaticConstruct", { enumerable: true, get: function () { return static_construct_1.StaticConstruct; } });
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ImageAppConstruct = void 0;
|
|
4
4
|
const aws_cloudfront_1 = require("aws-cdk-lib/aws-cloudfront");
|
|
5
5
|
const constructs_1 = require("constructs");
|
|
6
|
-
const params_from_attachable_1 = require("../../
|
|
6
|
+
const params_from_attachable_1 = require("../../shared/params-from-attachable");
|
|
7
7
|
const taskDefinitionImage_1 = require("../shared/taskDefinitionImage");
|
|
8
8
|
class ImageAppConstruct extends constructs_1.Construct {
|
|
9
9
|
props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next-app-router-construct.d.ts","sourceRoot":"","sources":["../../../../src/lib/ecs/apps/next-app-router-construct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"next-app-router-construct.d.ts","sourceRoot":"","sources":["../../../../src/lib/ecs/apps/next-app-router-construct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,KAAK,UAAU,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAC;AAE3C,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAWvC,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEvD,KAAK,kBAAkB,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;AAEjD,qBAAa,sBAAuB,SAAQ,SAAU,YAAW,YAAY;IAOjC,OAAO,CAAC,KAAK;IANhD,SAAS,EAAE,GAAG,CAAC,mBAAmB,CAAC;IACnC,KAAK,EAAE,GAAG,CAAC,KAAK,GAAG,SAAS,CAAC;IAEpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAa;IACpC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAU;gBAEpB,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAU,KAAK,EAAE,kBAAkB;IA8B3E,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,eAAe,CAAC;IAcpE,gBAAgB,CAAC,cAAc,EAAE,MAAM;IAIvC,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC;IAI3C,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC;IAO7C,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO;CAG7B"}
|
|
@@ -2,20 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NextAppRouterConstruct = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const cdk = tslib_1.__importStar(require("aws-cdk-lib"));
|
|
5
6
|
const s3 = tslib_1.__importStar(require("aws-cdk-lib/aws-s3"));
|
|
6
7
|
const constructs_1 = require("constructs");
|
|
7
8
|
const next_app_router_1 = require("../../shared/next-app-router");
|
|
8
|
-
const params_from_attachable_1 = require("../../
|
|
9
|
+
const params_from_attachable_1 = require("../../shared/params-from-attachable");
|
|
10
|
+
const public_bucket_1 = require("../../shared/public-bucket");
|
|
9
11
|
const taskDefinitionImage_1 = require("../shared/taskDefinitionImage");
|
|
10
|
-
const constants_1 = require("../../util/constants");
|
|
11
|
-
const zod_1 = require("zod");
|
|
12
|
-
const params_from_ssm_1 = require("../../util/params-from-ssm");
|
|
13
|
-
const NextAppRouterContainerAppShema = constants_1.ContainerAppSchema.extend({
|
|
14
|
-
files: zod_1.z.object({
|
|
15
|
-
staticFiles: constants_1.ContainerAppFileSchema,
|
|
16
|
-
publicFiles: constants_1.ContainerAppFileSchema,
|
|
17
|
-
}),
|
|
18
|
-
});
|
|
19
12
|
class NextAppRouterConstruct extends constructs_1.Construct {
|
|
20
13
|
props;
|
|
21
14
|
container;
|
|
@@ -25,15 +18,19 @@ class NextAppRouterConstruct extends constructs_1.Construct {
|
|
|
25
18
|
constructor(scope, id, props) {
|
|
26
19
|
super(scope, id);
|
|
27
20
|
this.props = props;
|
|
21
|
+
this.static = (0, public_bucket_1.publicBucket)(this, 'StaticBucket');
|
|
22
|
+
const artifactBucket = new s3.Bucket(this, 'ArtifactStorage', {
|
|
23
|
+
removalPolicy: cdk.RemovalPolicy.DESTROY,
|
|
24
|
+
autoDeleteObjects: true,
|
|
25
|
+
});
|
|
28
26
|
if ('output' in props) {
|
|
29
|
-
const deployment = (0, next_app_router_1.staticDeployment)(this, props.output);
|
|
30
|
-
this.
|
|
31
|
-
this.files = deployment.files;
|
|
27
|
+
const deployment = (0, next_app_router_1.staticDeployment)(this, artifactBucket, props.output);
|
|
28
|
+
this.files = { artifactBucket: artifactBucket, ...deployment.files };
|
|
32
29
|
}
|
|
33
30
|
else {
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
this.files =
|
|
31
|
+
const fileParams = (0, next_app_router_1.filesFromSSM)(this, props.reference, props.version);
|
|
32
|
+
const appArtifact = s3.Bucket.fromBucketName(scope, 'AppArtifactStorage', fileParams.artifact);
|
|
33
|
+
this.files = { ...fileParams, artifactBucket: appArtifact };
|
|
37
34
|
}
|
|
38
35
|
this.container = (0, taskDefinitionImage_1.taskDefinitionImage)(this, `${props.appName}AppContainer`, props);
|
|
39
36
|
}
|
|
@@ -8,7 +8,7 @@ const pipes = tslib_1.__importStar(require("aws-cdk-lib/aws-pipes"));
|
|
|
8
8
|
const snsSubscription = tslib_1.__importStar(require("aws-cdk-lib/aws-sns-subscriptions"));
|
|
9
9
|
const sqs = tslib_1.__importStar(require("aws-cdk-lib/aws-sqs"));
|
|
10
10
|
const constructs_1 = require("constructs");
|
|
11
|
-
const params_from_attachable_1 = require("../../
|
|
11
|
+
const params_from_attachable_1 = require("../../shared/params-from-attachable");
|
|
12
12
|
const taskDefinitionImage_1 = require("../shared/taskDefinitionImage");
|
|
13
13
|
class TaskConstruct extends constructs_1.Construct {
|
|
14
14
|
props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taskDefinitionImage.d.ts","sourceRoot":"","sources":["../../../../src/lib/ecs/shared/taskDefinitionImage.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"taskDefinitionImage.d.ts","sourceRoot":"","sources":["../../../../src/lib/ecs/shared/taskDefinitionImage.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAG5C,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEzD,KAAK,KAAK,GAAG,SAAS,GACpB,IAAI,CAAC,aAAa,EAAE,KAAK,GAAG,MAAM,GAAG,UAAU,GAAG,gBAAgB,CAAC,CAAC;AAEtE,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,SAAS,EAChB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,KAAK,2BA4Cb"}
|
|
@@ -6,8 +6,7 @@ const node_path_1 = tslib_1.__importDefault(require("node:path"));
|
|
|
6
6
|
const ecr = tslib_1.__importStar(require("aws-cdk-lib/aws-ecr"));
|
|
7
7
|
const ecrAssets = tslib_1.__importStar(require("aws-cdk-lib/aws-ecr-assets"));
|
|
8
8
|
const ecs = tslib_1.__importStar(require("aws-cdk-lib/aws-ecs"));
|
|
9
|
-
const
|
|
10
|
-
const constants_1 = require("../../util/constants");
|
|
9
|
+
const container_from_param_1 = require("../../shared/container-from-param");
|
|
11
10
|
function taskDefinitionImage(scope, id, props) {
|
|
12
11
|
let image;
|
|
13
12
|
let containerProps;
|
|
@@ -24,7 +23,7 @@ function taskDefinitionImage(scope, id, props) {
|
|
|
24
23
|
containerProps = _containerProps;
|
|
25
24
|
}
|
|
26
25
|
else {
|
|
27
|
-
const params = (0,
|
|
26
|
+
const params = (0, container_from_param_1.containerParamsFromSSM)(scope, props.reference, props.version);
|
|
28
27
|
const repository = ecr.Repository.fromRepositoryName(scope, `${id}Repository`, params.repository);
|
|
29
28
|
image = ecs.ContainerImage.fromEcrRepository(repository, params.tag);
|
|
30
29
|
containerProps = props.container;
|
package/dist/lib/ecs/types.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/ecs/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CA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AAC,CAAC;IACtC,UAAU,CAAC,EAAE,0BAA0B,CAAC;CACzC,GAAG,SAAS,CAAC;AAEd,MAAM,MAAM,aAAa,CAAC,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI;IACjE,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,QAAQ,CAAC;IACnB,cAAc,EAAE,cAAc,CAAC;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,WAAW,EAAE,WAAW,CAAC;IACzB,YAAY,EAAE,CACZ,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM,EACf,UAAU,CAAC,EAAE,MAAM,KAChB;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,oBAAoB,CAAA;KAAE,CAAC;IACxD,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,SAAS,CAAC;AAEd,MAAM,MAAM,mBAAmB,GAAG;IAChC,GAAG,EAAE,IAAI,CAAC;IACV,QAAQ,EAAE,QAAQ,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,UAAU,CAAC,EAAE,0BAA0B,CAAC;CACzC,GAAG,SAAS,CAAC;AAEd,MAAM,WAAW,YAAa,SAAQ,MAAM,EAAE,WAAW,EAAE,WAAW;CAAG"}
|
|
@@ -10,37 +10,8 @@ import { AppConstruct, AppProperties } from '../types';
|
|
|
10
10
|
declare const BuildParamsSchema: z.ZodObject<{
|
|
11
11
|
container: z.ZodOptional<z.ZodObject<{
|
|
12
12
|
file: z.ZodOptional<z.ZodString>;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
file: z.ZodOptional<z.ZodString>;
|
|
16
|
-
cmd: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
17
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
18
|
-
file: z.ZodOptional<z.ZodString>;
|
|
19
|
-
cmd: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
20
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
21
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
22
|
-
container: z.ZodOptional<z.ZodObject<{
|
|
23
|
-
file: z.ZodOptional<z.ZodString>;
|
|
24
|
-
cmd: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
25
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
26
|
-
file: z.ZodOptional<z.ZodString>;
|
|
27
|
-
cmd: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
28
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
29
|
-
file: z.ZodOptional<z.ZodString>;
|
|
30
|
-
cmd: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
31
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
32
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
33
|
-
container: z.ZodOptional<z.ZodObject<{
|
|
34
|
-
file: z.ZodOptional<z.ZodString>;
|
|
35
|
-
cmd: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
36
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
37
|
-
file: z.ZodOptional<z.ZodString>;
|
|
38
|
-
cmd: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
39
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
40
|
-
file: z.ZodOptional<z.ZodString>;
|
|
41
|
-
cmd: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
42
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
43
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
13
|
+
}, z.core.$loose>>;
|
|
14
|
+
}, z.core.$loose>;
|
|
44
15
|
export declare class ImageAppConstruct extends Construct implements AppConstruct {
|
|
45
16
|
function: Function;
|
|
46
17
|
queue: Queue | undefined;
|
|
@@ -51,18 +22,13 @@ export declare class ImageAppConstruct extends Construct implements AppConstruct
|
|
|
51
22
|
cloudfront(path: string): Record<string, BehaviorOptions>;
|
|
52
23
|
cloudfrontPolicy(distributionId: string): void;
|
|
53
24
|
api(path: string): Record<string, HttpRouteIntegration>;
|
|
54
|
-
static parse(params: unknown):
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
62
|
-
file: z.ZodOptional<z.ZodString>;
|
|
63
|
-
cmd: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
64
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
65
|
-
}, z.ZodTypeAny, "passthrough">;
|
|
25
|
+
static parse(params: unknown): {
|
|
26
|
+
[x: string]: unknown;
|
|
27
|
+
container?: {
|
|
28
|
+
[x: string]: unknown;
|
|
29
|
+
file?: string | undefined;
|
|
30
|
+
} | undefined;
|
|
31
|
+
};
|
|
66
32
|
}
|
|
67
33
|
export {};
|
|
68
34
|
//# sourceMappingURL=image-app-construct.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-app-construct.d.ts","sourceRoot":"","sources":["../../../../src/lib/lambda/apps/image-app-construct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAEL,eAAe,EAKhB,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"image-app-construct.d.ts","sourceRoot":"","sources":["../../../../src/lib/lambda/apps/image-app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AAM,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO;;;;;;;CAG7B"}
|
|
@@ -5,31 +5,23 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
6
6
|
const aws_cloudfront_1 = require("aws-cdk-lib/aws-cloudfront");
|
|
7
7
|
const aws_cloudfront_origins_1 = require("aws-cdk-lib/aws-cloudfront-origins");
|
|
8
|
-
const
|
|
8
|
+
const cdk = tslib_1.__importStar(require("aws-cdk-lib"));
|
|
9
9
|
const ecr = tslib_1.__importStar(require("aws-cdk-lib/aws-ecr"));
|
|
10
|
+
const aws_ecr_assets_1 = require("aws-cdk-lib/aws-ecr-assets");
|
|
10
11
|
const aws_lambda_1 = require("aws-cdk-lib/aws-lambda");
|
|
11
12
|
const aws_lambda_event_sources_1 = require("aws-cdk-lib/aws-lambda-event-sources");
|
|
12
13
|
const aws_sns_subscriptions_1 = require("aws-cdk-lib/aws-sns-subscriptions");
|
|
13
14
|
const aws_sqs_1 = require("aws-cdk-lib/aws-sqs");
|
|
14
15
|
const constructs_1 = require("constructs");
|
|
15
16
|
const zod_1 = require("zod");
|
|
17
|
+
const container_from_param_1 = require("../../shared/container-from-param");
|
|
16
18
|
const getDefaultLambda_1 = require("../utils/getDefaultLambda");
|
|
17
19
|
const lambda_api_1 = require("../utils/lambda-api");
|
|
18
20
|
const lambda_attach_1 = require("../utils/lambda-attach");
|
|
19
21
|
const lambda_grant_1 = require("../utils/lambda-grant");
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
.object({
|
|
24
|
-
container: zod_1.z
|
|
25
|
-
.object({
|
|
26
|
-
file: zod_1.z.string().optional(),
|
|
27
|
-
cmd: zod_1.z.string().array().optional(),
|
|
28
|
-
})
|
|
29
|
-
.passthrough()
|
|
30
|
-
.optional(),
|
|
31
|
-
})
|
|
32
|
-
.passthrough();
|
|
22
|
+
const BuildParamsSchema = zod_1.z.looseObject({
|
|
23
|
+
container: zod_1.z.looseObject({ file: zod_1.z.string().optional() }).optional(),
|
|
24
|
+
});
|
|
33
25
|
class ImageAppConstruct extends constructs_1.Construct {
|
|
34
26
|
function;
|
|
35
27
|
queue;
|
|
@@ -38,11 +30,17 @@ class ImageAppConstruct extends constructs_1.Construct {
|
|
|
38
30
|
const { container, ...functionProps } = props.buildParams;
|
|
39
31
|
let code;
|
|
40
32
|
if ('reference' in props) {
|
|
41
|
-
const params = (0,
|
|
42
|
-
const repository = ecr.Repository.fromRepositoryName(this, '
|
|
33
|
+
const params = (0, container_from_param_1.containerParamsFromSSM)(this, props.reference, props.version);
|
|
34
|
+
const repository = ecr.Repository.fromRepositoryName(this, 'Repository', params.repository);
|
|
35
|
+
console.log({
|
|
36
|
+
paramsToken: cdk.Token.asList(params.cmd),
|
|
37
|
+
paramsSplit: cdk.Fn.split(',', params.cmd),
|
|
38
|
+
paramsSplits: new cdk.CfnJson(this, 'Params', { value: params.cmd }),
|
|
39
|
+
params: params.cmd,
|
|
40
|
+
});
|
|
43
41
|
code = aws_lambda_1.Code.fromEcrImage(repository, {
|
|
44
42
|
tagOrDigest: params.tag,
|
|
45
|
-
cmd:
|
|
43
|
+
cmd: cdk.Fn.split(',', params.cmd),
|
|
46
44
|
});
|
|
47
45
|
}
|
|
48
46
|
else {
|
|
@@ -8,12 +8,8 @@ import { Construct } from 'constructs';
|
|
|
8
8
|
import { z } from 'zod';
|
|
9
9
|
import { AppConstruct, AppProperties } from '../types';
|
|
10
10
|
declare const BuildParamsSchema: z.ZodObject<{
|
|
11
|
-
cmd: z.ZodString
|
|
12
|
-
},
|
|
13
|
-
cmd: z.ZodString;
|
|
14
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
15
|
-
cmd: z.ZodString;
|
|
16
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
11
|
+
cmd: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, z.core.$loose>;
|
|
17
13
|
export declare class NextAppRouterConstruct extends Construct implements AppConstruct {
|
|
18
14
|
function: lambda.Function;
|
|
19
15
|
queue: sqs.Queue | undefined;
|
|
@@ -26,9 +22,10 @@ export declare class NextAppRouterConstruct extends Construct implements AppCons
|
|
|
26
22
|
attach(attachable: Record<string, Attachable>): void;
|
|
27
23
|
grant(...grants: Grantable[]): void;
|
|
28
24
|
subscription(): ITopicSubscription;
|
|
29
|
-
static parse(params: unknown):
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
static parse(params: unknown): {
|
|
26
|
+
[x: string]: unknown;
|
|
27
|
+
cmd?: string | undefined;
|
|
28
|
+
};
|
|
32
29
|
}
|
|
33
30
|
export {};
|
|
34
31
|
//# sourceMappingURL=next-app-router-construct.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next-app-router-construct.d.ts","sourceRoot":"","sources":["../../../../src/lib/lambda/apps/next-app-router-construct.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEzE,OAAO,KAAK,UAAU,MAAM,4BAA4B,CAAC;AAEzD,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAC;AAIjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"next-app-router-construct.d.ts","sourceRoot":"","sources":["../../../../src/lib/lambda/apps/next-app-router-construct.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEzE,OAAO,KAAK,UAAU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
|
|
|
9
9
|
const cloudfrontOrigin = tslib_1.__importStar(require("aws-cdk-lib/aws-cloudfront-origins"));
|
|
10
10
|
const lambda = tslib_1.__importStar(require("aws-cdk-lib/aws-lambda"));
|
|
11
11
|
const aws_lambda_1 = require("aws-cdk-lib/aws-lambda");
|
|
12
|
+
const s3 = tslib_1.__importStar(require("aws-cdk-lib/aws-s3"));
|
|
12
13
|
const s3Deploy = tslib_1.__importStar(require("aws-cdk-lib/aws-s3-deployment"));
|
|
13
14
|
const constructs_1 = require("constructs");
|
|
14
15
|
const zod_1 = require("zod");
|
|
15
16
|
const next_app_router_1 = require("../../shared/next-app-router");
|
|
17
|
+
const public_bucket_1 = require("../../shared/public-bucket");
|
|
16
18
|
const getDefaultLambda_1 = require("../utils/getDefaultLambda");
|
|
17
19
|
const lambda_attach_1 = require("../utils/lambda-attach");
|
|
18
20
|
const lambda_grant_1 = require("../utils/lambda-grant");
|
|
19
|
-
const
|
|
21
|
+
const code_from_param_1 = require("../../shared/code-from-param");
|
|
22
|
+
const BuildParamsSchema = zod_1.z.looseObject({ cmd: zod_1.z.string().optional() });
|
|
20
23
|
class NextAppRouterConstruct extends constructs_1.Construct {
|
|
21
24
|
function;
|
|
22
25
|
queue;
|
|
@@ -24,13 +27,12 @@ class NextAppRouterConstruct extends constructs_1.Construct {
|
|
|
24
27
|
files;
|
|
25
28
|
constructor(scope, id, props) {
|
|
26
29
|
super(scope, id);
|
|
27
|
-
if (!('output' in props)) {
|
|
28
|
-
throw new Error('Output is required');
|
|
29
|
-
}
|
|
30
30
|
const region = cdk.Stack.of(this).region;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
this.static = (0, public_bucket_1.publicBucket)(this, 'StaticBucket');
|
|
32
|
+
const artifactBucket = new s3.Bucket(this, 'ArtifactStorage', {
|
|
33
|
+
removalPolicy: cdk.RemovalPolicy.DESTROY,
|
|
34
|
+
autoDeleteObjects: true,
|
|
35
|
+
});
|
|
34
36
|
const webAdapterLayer = lambda.LayerVersion.fromLayerVersionArn(this, 'WebAdapterLayer', `arn:aws:lambda:${region}:753240598075:layer:LambdaAdapterLayerX86:25`);
|
|
35
37
|
const environment = {
|
|
36
38
|
AWS_LAMBDA_EXEC_WRAPPER: '/opt/bootstrap',
|
|
@@ -39,15 +41,33 @@ class NextAppRouterConstruct extends constructs_1.Construct {
|
|
|
39
41
|
AWS_LWA_INVOKE_MODE: 'response_stream',
|
|
40
42
|
};
|
|
41
43
|
const { cmd, ...functionProps } = props.buildParams;
|
|
42
|
-
const serverOutput = path.join(props.output, '/.next/standalone');
|
|
43
|
-
fs.writeFileSync(path.join(serverOutput, 'run.sh'), cmd);
|
|
44
44
|
const defaultProps = (0, getDefaultLambda_1.getDefaultLambda)(props);
|
|
45
|
+
let handler;
|
|
46
|
+
let code;
|
|
47
|
+
if ('output' in props) {
|
|
48
|
+
const deployment = (0, next_app_router_1.staticDeployment)(this, artifactBucket, props.output);
|
|
49
|
+
this.files = { artifactBucket, ...deployment.files };
|
|
50
|
+
const serverOutput = path.join(props.output, '/.next/standalone');
|
|
51
|
+
if (!cmd)
|
|
52
|
+
throw new Error('cmd is required when building from local');
|
|
53
|
+
fs.writeFileSync(path.join(serverOutput, 'run.sh'), cmd);
|
|
54
|
+
handler = 'run.sh';
|
|
55
|
+
code = lambda.Code.fromAsset(serverOutput);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
const fileParams = (0, next_app_router_1.filesFromSSM)(this, props.reference, props.version);
|
|
59
|
+
const appArtifact = s3.Bucket.fromBucketName(scope, 'AppArtifactStorage', fileParams.artifact);
|
|
60
|
+
this.files = { ...fileParams, artifactBucket: appArtifact };
|
|
61
|
+
const cmdParams = (0, code_from_param_1.codeFromSSM)(this, props.reference, props.version);
|
|
62
|
+
handler = cmdParams.cmd;
|
|
63
|
+
code = lambda.Code.fromBucketV2(appArtifact, cmdParams.code);
|
|
64
|
+
}
|
|
45
65
|
this.function = new lambda.Function(this, `AppFunction`, {
|
|
46
66
|
...defaultProps,
|
|
47
67
|
environment: Object.assign({}, defaultProps.environment, environment),
|
|
48
68
|
runtime: lambda.Runtime.NODEJS_20_X,
|
|
49
|
-
handler
|
|
50
|
-
code
|
|
69
|
+
handler,
|
|
70
|
+
code,
|
|
51
71
|
layers: [webAdapterLayer],
|
|
52
72
|
...functionProps,
|
|
53
73
|
});
|
|
@@ -70,9 +90,10 @@ class NextAppRouterConstruct extends constructs_1.Construct {
|
|
|
70
90
|
invokeMode: aws_lambda_1.InvokeMode.RESPONSE_STREAM,
|
|
71
91
|
});
|
|
72
92
|
if (this.files.staticFiles) {
|
|
73
|
-
const staticFiles = s3Deploy.Source.bucket(this.
|
|
93
|
+
const staticFiles = s3Deploy.Source.bucket(this.files.artifactBucket, this.files.staticFiles.key);
|
|
74
94
|
const deployment = new s3Deploy.BucketDeployment(this, `${strippedBasePath}StaticDeployment`, {
|
|
75
95
|
destinationBucket: this.static,
|
|
96
|
+
prune: false,
|
|
76
97
|
sources: [staticFiles],
|
|
77
98
|
destinationKeyPrefix: strippedBasePath
|
|
78
99
|
? `${strippedBasePath}/_next/static/`
|
|
@@ -84,9 +105,10 @@ class NextAppRouterConstruct extends constructs_1.Construct {
|
|
|
84
105
|
}
|
|
85
106
|
}
|
|
86
107
|
if (this.files.publicFiles) {
|
|
87
|
-
const publicFiles = s3Deploy.Source.bucket(this.
|
|
108
|
+
const publicFiles = s3Deploy.Source.bucket(this.files.artifactBucket, this.files.publicFiles.key);
|
|
88
109
|
const deployment = new s3Deploy.BucketDeployment(this, `${strippedBasePath}PublicDeployment`, {
|
|
89
110
|
destinationBucket: this.static,
|
|
111
|
+
prune: false,
|
|
90
112
|
sources: [publicFiles],
|
|
91
113
|
destinationKeyPrefix: strippedBasePath
|
|
92
114
|
? `${strippedBasePath}/`
|
|
@@ -4,19 +4,11 @@ import * as lambda from 'aws-cdk-lib/aws-lambda';
|
|
|
4
4
|
import { ITopicSubscription, SubscriptionProps } from 'aws-cdk-lib/aws-sns';
|
|
5
5
|
import * as sqs from 'aws-cdk-lib/aws-sqs';
|
|
6
6
|
import { Construct } from 'constructs';
|
|
7
|
-
import { z } from 'zod';
|
|
8
7
|
import { AppConstruct, AppProperties } from '../types';
|
|
9
|
-
declare const BuildParamsSchema: z.ZodObject<{
|
|
10
|
-
cmd: z.ZodString;
|
|
11
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
12
|
-
cmd: z.ZodString;
|
|
13
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
14
|
-
cmd: z.ZodString;
|
|
15
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
16
8
|
export declare class NodeApiConstruct extends Construct implements AppConstruct {
|
|
17
9
|
function: lambda.Function;
|
|
18
10
|
queue: sqs.Queue | undefined;
|
|
19
|
-
constructor(scope: Construct, id: string, props: AppProperties
|
|
11
|
+
constructor(scope: Construct, id: string, props: AppProperties);
|
|
20
12
|
attach(attachable: Record<string, Attachable>): void;
|
|
21
13
|
grant(...grants: Grantable[]): void;
|
|
22
14
|
subscription(props: SubscriptionProps): ITopicSubscription;
|
|
@@ -35,9 +27,6 @@ export declare class NodeApiConstruct extends Construct implements AppConstruct
|
|
|
35
27
|
api(path: string): {
|
|
36
28
|
[x: string]: cdk.aws_apigatewayv2_integrations.HttpUrlIntegration;
|
|
37
29
|
};
|
|
38
|
-
static parse(params:
|
|
39
|
-
cmd: z.ZodString;
|
|
40
|
-
}, z.ZodTypeAny, "passthrough">;
|
|
30
|
+
static parse<T>(params: T): T;
|
|
41
31
|
}
|
|
42
|
-
export {};
|
|
43
32
|
//# sourceMappingURL=node-api-construct.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-api-construct.d.ts","sourceRoot":"","sources":["../../../../src/lib/lambda/apps/node-api-construct.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,KAAK,GAAG,M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B,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC;CAG1B"}
|
|
@@ -11,12 +11,10 @@ const lambda = tslib_1.__importStar(require("aws-cdk-lib/aws-lambda"));
|
|
|
11
11
|
const lambdaEventSource = tslib_1.__importStar(require("aws-cdk-lib/aws-lambda-event-sources"));
|
|
12
12
|
const sqs = tslib_1.__importStar(require("aws-cdk-lib/aws-sqs"));
|
|
13
13
|
const constructs_1 = require("constructs");
|
|
14
|
-
const zod_1 = require("zod");
|
|
15
14
|
const getDefaultLambda_1 = require("../utils/getDefaultLambda");
|
|
16
15
|
const lambda_api_1 = require("../utils/lambda-api");
|
|
17
16
|
const lambda_attach_1 = require("../utils/lambda-attach");
|
|
18
17
|
const lambda_grant_1 = require("../utils/lambda-grant");
|
|
19
|
-
const BuildParamsSchema = zod_1.z.object({ cmd: zod_1.z.string() }).passthrough();
|
|
20
18
|
class NodeApiConstruct extends constructs_1.Construct {
|
|
21
19
|
function;
|
|
22
20
|
queue;
|
|
@@ -34,8 +32,8 @@ class NodeApiConstruct extends constructs_1.Construct {
|
|
|
34
32
|
const layers = [
|
|
35
33
|
lambda.LayerVersion.fromLayerVersionArn(this, 'WebAdapterLayer', `arn:aws:lambda:${region}:753240598075:layer:LambdaAdapterLayerX86:16`),
|
|
36
34
|
];
|
|
37
|
-
const
|
|
38
|
-
node_fs_1.default.writeFileSync(node_path_1.default.join(props.output, 'run.sh'), cmd);
|
|
35
|
+
const functionProps = props.buildParams;
|
|
36
|
+
node_fs_1.default.writeFileSync(node_path_1.default.join(props.output, 'run.sh'), props.cmd);
|
|
39
37
|
const defaultProps = (0, getDefaultLambda_1.getDefaultLambda)(props);
|
|
40
38
|
this.function = new lambda.Function(this, `AppFunction`, {
|
|
41
39
|
...defaultProps,
|
|
@@ -87,7 +85,7 @@ class NodeApiConstruct extends constructs_1.Construct {
|
|
|
87
85
|
return (0, lambda_api_1.lambdaApi)(this.function, path);
|
|
88
86
|
}
|
|
89
87
|
static parse(params) {
|
|
90
|
-
return
|
|
88
|
+
return params;
|
|
91
89
|
}
|
|
92
90
|
}
|
|
93
91
|
exports.NodeApiConstruct = NodeApiConstruct;
|
|
@@ -5,28 +5,17 @@ import * as lambda from 'aws-cdk-lib/aws-lambda';
|
|
|
5
5
|
import { ITopicSubscription, SubscriptionProps } from 'aws-cdk-lib/aws-sns';
|
|
6
6
|
import * as sqs from 'aws-cdk-lib/aws-sqs';
|
|
7
7
|
import { Construct } from 'constructs';
|
|
8
|
-
import { z } from 'zod';
|
|
9
8
|
import { AppConstruct, AppProperties } from '../types';
|
|
10
|
-
declare const BuildParamsSchema: z.ZodObject<{
|
|
11
|
-
handler: z.ZodOptional<z.ZodString>;
|
|
12
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
13
|
-
handler: z.ZodOptional<z.ZodString>;
|
|
14
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
15
|
-
handler: z.ZodOptional<z.ZodString>;
|
|
16
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
17
9
|
export declare class NodeAppConstruct extends Construct implements AppConstruct {
|
|
18
10
|
function: lambda.Function;
|
|
19
11
|
queue: sqs.Queue | undefined;
|
|
20
|
-
constructor(scope: Construct, id: string, props: AppProperties
|
|
12
|
+
constructor(scope: Construct, id: string, props: AppProperties);
|
|
21
13
|
attach(attachable: Record<string, Attachable>): void;
|
|
22
14
|
grant(...grants: Grantable[]): void;
|
|
23
15
|
subscription(props: SubscriptionProps): ITopicSubscription;
|
|
24
16
|
cloudfront(path: string): Record<string, BehaviorOptions>;
|
|
25
17
|
cloudfrontPolicy(distributionId: string): void;
|
|
26
18
|
api(path: string): Record<string, HttpRouteIntegration>;
|
|
27
|
-
static parse(params:
|
|
28
|
-
handler: z.ZodOptional<z.ZodString>;
|
|
29
|
-
}, z.ZodTypeAny, "passthrough">;
|
|
19
|
+
static parse<T>(params: T): T;
|
|
30
20
|
}
|
|
31
|
-
export {};
|
|
32
21
|
//# sourceMappingURL=node-app-construct.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-app-construct.d.ts","sourceRoot":"","sources":["../../../../src/lib/lambda/apps/node-app-construct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEzE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE5E,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"node-app-construct.d.ts","sourceRoot":"","sources":["../../../../src/lib/lambda/apps/node-app-construct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEzE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE5E,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAKvD,qBAAa,gBAAiB,SAAQ,SAAU,YAAW,YAAY;IAC9D,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC;IAC1B,KAAK,EAAE,GAAG,CAAC,KAAK,GAAG,SAAS,CAAC;gBAExB,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa;IAgC9D,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC;IAI7C,KAAK,CAAC,GAAG,MAAM,EAAE,SAAS,EAAE;IAI5B,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,kBAAkB;IAU1D,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC;IAIzD,gBAAgB,CAAC,cAAc,EAAE,MAAM;IAIvC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC;IAcvD,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC;CAG1B"}
|
|
@@ -9,13 +9,9 @@ const aws_lambda_event_sources_1 = require("aws-cdk-lib/aws-lambda-event-sources
|
|
|
9
9
|
const snsSubscriptions = tslib_1.__importStar(require("aws-cdk-lib/aws-sns-subscriptions"));
|
|
10
10
|
const aws_sqs_1 = require("aws-cdk-lib/aws-sqs");
|
|
11
11
|
const constructs_1 = require("constructs");
|
|
12
|
-
const zod_1 = require("zod");
|
|
13
12
|
const getDefaultLambda_1 = require("../utils/getDefaultLambda");
|
|
14
13
|
const lambda_attach_1 = require("../utils/lambda-attach");
|
|
15
14
|
const lambda_grant_1 = require("../utils/lambda-grant");
|
|
16
|
-
const BuildParamsSchema = zod_1.z
|
|
17
|
-
.object({ handler: zod_1.z.string().optional() })
|
|
18
|
-
.passthrough();
|
|
19
15
|
class NodeAppConstruct extends constructs_1.Construct {
|
|
20
16
|
function;
|
|
21
17
|
queue;
|
|
@@ -71,7 +67,7 @@ class NodeAppConstruct extends constructs_1.Construct {
|
|
|
71
67
|
};
|
|
72
68
|
}
|
|
73
69
|
static parse(params) {
|
|
74
|
-
return
|
|
70
|
+
return params;
|
|
75
71
|
}
|
|
76
72
|
}
|
|
77
73
|
exports.NodeAppConstruct = NodeAppConstruct;
|
|
@@ -14,11 +14,13 @@ export interface AppConstruct extends Attach, Grant, CDNResource, EventResource,
|
|
|
14
14
|
}
|
|
15
15
|
export type App = {
|
|
16
16
|
type: typeof AppType.IMAGE_APP | typeof AppType.NEXT_APP_ROUTER | typeof AppType.NODE_APP | typeof AppType.NODE_API;
|
|
17
|
-
} & Omit<AppProperties, 'vpc' | 'logGroup'
|
|
17
|
+
} & Omit<AppProperties, 'vpc' | 'logGroup'> & AppResource;
|
|
18
18
|
export type AppResource = {
|
|
19
19
|
output: string;
|
|
20
|
+
cmd: string;
|
|
20
21
|
} | {
|
|
21
22
|
reference: string;
|
|
23
|
+
version?: string;
|
|
22
24
|
};
|
|
23
25
|
export type AppProperties<BuildParams = Record<string, unknown>> = {
|
|
24
26
|
logGroup: ILogGroup;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/lambda/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAChB,OAAO,EACP,KAAK,MAAM,EACX,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,KAAK,EACX,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE7D,MAAM,MAAM,oBAAoB,GAAG;IACjC,GAAG,CAAC,EAAE,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1B,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,MA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