@fy-stack/app-construct 0.0.147-alpha.3061 → 0.0.147-alpha.30611
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 +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -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 +9 -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 +33 -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 +19 -10
- 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 +16 -9
- 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 +7 -0
- package/dist/lib/shared/code-from-param.d.ts.map +1 -0
- package/dist/lib/shared/code-from-param.js +12 -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/node-api-code.d.ts +10 -0
- package/dist/lib/standalone/node-api-code.d.ts.map +1 -0
- package/dist/lib/standalone/node-api-code.js +14 -0
- package/dist/lib/standalone/node-app-code.d.ts +9 -0
- package/dist/lib/standalone/node-app-code.d.ts.map +1 -0
- package/dist/lib/standalone/node-app-code.js +41 -0
- 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
|
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const cdk = tslib_1.__importStar(require("aws-cdk-lib"));
|
|
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
|
+
const s3 = tslib_1.__importStar(require("aws-cdk-lib/aws-s3"));
|
|
8
9
|
const ssm = tslib_1.__importStar(require("aws-cdk-lib/aws-ssm"));
|
|
9
10
|
const ecrDeployment = tslib_1.__importStar(require("cdk-ecr-deployment"));
|
|
10
11
|
const constructs_1 = require("constructs");
|
|
@@ -17,31 +18,43 @@ class NextAppRouterContainer extends constructs_1.Construct {
|
|
|
17
18
|
emptyOnDelete: true,
|
|
18
19
|
removalPolicy: cdk.RemovalPolicy.DESTROY,
|
|
19
20
|
});
|
|
21
|
+
const artifactBucket = new s3.Bucket(this, 'ArtifactStorage', {
|
|
22
|
+
removalPolicy: cdk.RemovalPolicy.DESTROY,
|
|
23
|
+
autoDeleteObjects: true,
|
|
24
|
+
});
|
|
20
25
|
const container = new ecrAssets.DockerImageAsset(this, 'ContainerAsset', {
|
|
21
26
|
directory: props.output,
|
|
22
27
|
platform: ecrAssets.Platform.LINUX_AMD64,
|
|
23
28
|
...props.container,
|
|
24
29
|
});
|
|
25
|
-
const deployment = (0, next_app_router_1.staticDeployment)(this, props.output);
|
|
30
|
+
const deployment = (0, next_app_router_1.staticDeployment)(this, artifactBucket, props.output, props.version);
|
|
26
31
|
new ecrDeployment.ECRDeployment(this, 'DeployedContainer', {
|
|
27
32
|
src: new ecrDeployment.DockerImageName(container.imageUri),
|
|
28
33
|
dest: new ecrDeployment.DockerImageName(cdk.Fn.join(':', [repo.repositoryUri, props.version])),
|
|
29
34
|
});
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
35
|
+
const versions = [props.version, 'latest'];
|
|
36
|
+
const parameters = [];
|
|
37
|
+
for (const v of versions) {
|
|
38
|
+
parameters.push(new ssm.StringParameter(this, `RepositoryParamV${v}`, {
|
|
39
|
+
parameterName: `/${stackName}/${v}/repository`,
|
|
40
|
+
stringValue: repo.repositoryName,
|
|
41
|
+
}), new ssm.StringParameter(this, `ArtifactsParamV${v}`, {
|
|
42
|
+
parameterName: `/${stackName}/${v}/artifacts`,
|
|
43
|
+
stringValue: artifactBucket.bucketName,
|
|
44
|
+
}), new ssm.StringParameter(this, `StaticFilesKeyParamV${v}`, {
|
|
45
|
+
parameterName: `/${stackName}/${v}/files/staticFiles/key`,
|
|
46
|
+
stringValue: deployment.files.staticFiles.key,
|
|
47
|
+
}), new ssm.StringParameter(this, `PublicFilesKeyParamV${v}`, {
|
|
48
|
+
parameterName: `/${stackName}/${v}/files/publicFiles/key`,
|
|
49
|
+
stringValue: deployment.files.publicFiles.key,
|
|
50
|
+
}), new ssm.StringParameter(this, `TagParamV${v}`, {
|
|
51
|
+
parameterName: `/${stackName}/${v}/tag`,
|
|
52
|
+
stringValue: props.version,
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
55
|
+
for (const p of parameters) {
|
|
56
|
+
p.applyRemovalPolicy(cdk.RemovalPolicy.RETAIN);
|
|
57
|
+
}
|
|
45
58
|
}
|
|
46
59
|
}
|
|
47
60
|
exports.NextAppRouterContainer = NextAppRouterContainer;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Construct } from 'constructs';
|
|
2
|
+
import { NodeAppCode } from './node-app-code';
|
|
3
|
+
import type { StandaloneApp } from './types';
|
|
4
|
+
export type NodeApiCodeProps = StandaloneApp & {
|
|
5
|
+
cmd: string;
|
|
6
|
+
};
|
|
7
|
+
export declare class NodeApiCode extends NodeAppCode {
|
|
8
|
+
constructor(scope: Construct, id: string, props: NodeApiCodeProps);
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=node-api-code.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-api-code.d.ts","sourceRoot":"","sources":["../../../src/lib/standalone/node-api-code.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;IAC7C,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,qBAAa,WAAY,SAAQ,WAAW;gBAC9B,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB;CAKlE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NodeApiCode = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
|
|
6
|
+
const node_path_1 = tslib_1.__importDefault(require("node:path"));
|
|
7
|
+
const node_app_code_1 = require("./node-app-code");
|
|
8
|
+
class NodeApiCode extends node_app_code_1.NodeAppCode {
|
|
9
|
+
constructor(scope, id, props) {
|
|
10
|
+
node_fs_1.default.writeFileSync(node_path_1.default.join(props.output, 'run.sh'), props.cmd);
|
|
11
|
+
super(scope, id, { ...props, handler: 'run.sh' });
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.NodeApiCode = NodeApiCode;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Construct } from 'constructs';
|
|
2
|
+
import type { StandaloneApp } from './types';
|
|
3
|
+
export type NodeCodeProps = StandaloneApp & {
|
|
4
|
+
handler?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare class NodeAppCode extends Construct {
|
|
7
|
+
constructor(scope: Construct, id: string, props: NodeCodeProps);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=node-app-code.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-app-code.d.ts","sourceRoot":"","sources":["../../../src/lib/standalone/node-app-code.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAGvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,MAAM,aAAa,GAAG,aAAa,GAAG;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,qBAAa,WAAY,SAAQ,SAAS;gBAC5B,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa;CA6C/D"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NodeAppCode = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const cdk = tslib_1.__importStar(require("aws-cdk-lib"));
|
|
6
|
+
const s3 = tslib_1.__importStar(require("aws-cdk-lib/aws-s3"));
|
|
7
|
+
const ssm = tslib_1.__importStar(require("aws-cdk-lib/aws-ssm"));
|
|
8
|
+
const constructs_1 = require("constructs");
|
|
9
|
+
const code_deployment_1 = require("../shared/code-deployment");
|
|
10
|
+
class NodeAppCode extends constructs_1.Construct {
|
|
11
|
+
constructor(scope, id, props) {
|
|
12
|
+
super(scope, id);
|
|
13
|
+
const stackName = cdk.Stack.of(this).stackName;
|
|
14
|
+
const artifactBucket = new s3.Bucket(this, 'ArtifactStorage', {
|
|
15
|
+
removalPolicy: cdk.RemovalPolicy.DESTROY,
|
|
16
|
+
autoDeleteObjects: true,
|
|
17
|
+
});
|
|
18
|
+
const code = (0, code_deployment_1.codeDeployment)(this, artifactBucket, props.output, props.version);
|
|
19
|
+
const versions = [props.version, 'latest'];
|
|
20
|
+
const parameters = [];
|
|
21
|
+
for (const v of versions) {
|
|
22
|
+
parameters.push(new ssm.StringParameter(this, `ArtifactsParamV${v}`, {
|
|
23
|
+
parameterName: `/${stackName}/${v}/artifacts`,
|
|
24
|
+
stringValue: artifactBucket.bucketName,
|
|
25
|
+
}), new ssm.StringParameter(this, `CodeFilesKeyParamV${v}`, {
|
|
26
|
+
parameterName: `/${stackName}/${v}/code`,
|
|
27
|
+
stringValue: code,
|
|
28
|
+
}), new ssm.StringParameter(this, `CodeCMDParamV${v}`, {
|
|
29
|
+
parameterName: `/${stackName}/${v}/code/handler`,
|
|
30
|
+
stringValue: props.handler ?? 'index.handler',
|
|
31
|
+
}), new ssm.StringParameter(this, `TagParamV${v}`, {
|
|
32
|
+
parameterName: `/${stackName}/${v}/tag`,
|
|
33
|
+
stringValue: props.version,
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
for (const p of parameters) {
|
|
37
|
+
p.applyRemovalPolicy(cdk.RemovalPolicy.RETAIN);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.NodeAppCode = NodeAppCode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/standalone/types.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/standalone/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC"}
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import type { HttpRouteIntegration } from 'aws-cdk-lib/aws-apigatewayv2';
|
|
2
2
|
import * as cloudfront from 'aws-cdk-lib/aws-cloudfront';
|
|
3
3
|
import { Construct } from 'constructs';
|
|
4
|
-
import { z } from 'zod';
|
|
5
4
|
import { AppConstruct, AppProperties } from '../types';
|
|
6
|
-
declare const BuildParamsSchema: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
|
|
7
5
|
export declare class NextPagesExportConstruct extends Construct implements AppConstruct {
|
|
8
6
|
private readonly static;
|
|
9
|
-
constructor(scope: Construct, id: string, props: AppProperties
|
|
7
|
+
constructor(scope: Construct, id: string, props: AppProperties);
|
|
10
8
|
cloudfront(path: string): Record<string, cloudfront.BehaviorOptions>;
|
|
11
9
|
cloudfrontPolicy(distributionId: string): void;
|
|
12
10
|
api(): Record<string, HttpRouteIntegration>;
|
|
13
|
-
static parse(params:
|
|
11
|
+
static parse<T>(params: T): T;
|
|
14
12
|
}
|
|
15
|
-
export {};
|
|
16
13
|
//# sourceMappingURL=next-pages-export-construct.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next-pages-export-construct.d.ts","sourceRoot":"","sources":["../../../../src/lib/static/apps/next-pages-export-construct.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,KAAK,UAAU,MAAM,4BAA4B,CAAC;AAIzD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"next-pages-export-construct.d.ts","sourceRoot":"","sources":["../../../../src/lib/static/apps/next-pages-export-construct.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,KAAK,UAAU,MAAM,4BAA4B,CAAC;AAIzD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEvD,qBAAa,wBACX,SAAQ,SACR,YAAW,YAAY;IAEvB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAY;gBAEvB,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa;IAiC9D,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,eAAe,CAAC;IAmBpE,gBAAgB,CAAC,cAAc,EAAE,MAAM;IAIvC,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC;IAI3C,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC;CAG1B"}
|
|
@@ -9,8 +9,6 @@ const cloudfrontOrigin = tslib_1.__importStar(require("aws-cdk-lib/aws-cloudfron
|
|
|
9
9
|
const s3 = tslib_1.__importStar(require("aws-cdk-lib/aws-s3"));
|
|
10
10
|
const s3Deploy = tslib_1.__importStar(require("aws-cdk-lib/aws-s3-deployment"));
|
|
11
11
|
const constructs_1 = require("constructs");
|
|
12
|
-
const zod_1 = require("zod");
|
|
13
|
-
const BuildParamsSchema = zod_1.z.object({}).optional();
|
|
14
12
|
class NextPagesExportConstruct extends constructs_1.Construct {
|
|
15
13
|
static;
|
|
16
14
|
constructor(scope, id, props) {
|
|
@@ -63,7 +61,7 @@ class NextPagesExportConstruct extends constructs_1.Construct {
|
|
|
63
61
|
throw new Error('api not supported for this construct');
|
|
64
62
|
}
|
|
65
63
|
static parse(params) {
|
|
66
|
-
return
|
|
64
|
+
return params;
|
|
67
65
|
}
|
|
68
66
|
}
|
|
69
67
|
exports.NextPagesExportConstruct = NextPagesExportConstruct;
|
|
@@ -3,13 +3,9 @@ import * as cloudfront from 'aws-cdk-lib/aws-cloudfront';
|
|
|
3
3
|
import { Construct } from 'constructs';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import { AppConstruct, AppProperties } from '../types';
|
|
6
|
-
declare const BuildParamsSchema: z.ZodOptional<z.ZodObject<{
|
|
6
|
+
declare const BuildParamsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
7
7
|
spa: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
-
},
|
|
9
|
-
spa?: boolean | undefined;
|
|
10
|
-
}, {
|
|
11
|
-
spa?: boolean | undefined;
|
|
12
|
-
}>>;
|
|
8
|
+
}, z.core.$strip>>>;
|
|
13
9
|
export declare class StaticWebsiteConstruct extends Construct implements AppConstruct {
|
|
14
10
|
private props;
|
|
15
11
|
private readonly static;
|
|
@@ -19,7 +15,7 @@ export declare class StaticWebsiteConstruct extends Construct implements AppCons
|
|
|
19
15
|
api(): Record<string, HttpRouteIntegration>;
|
|
20
16
|
static parse(params: unknown): {
|
|
21
17
|
spa?: boolean | undefined;
|
|
22
|
-
}
|
|
18
|
+
};
|
|
23
19
|
}
|
|
24
20
|
export {};
|
|
25
21
|
//# sourceMappingURL=static-website-construct.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static-website-construct.d.ts","sourceRoot":"","sources":["../../../../src/lib/static/apps/static-website-construct.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,KAAK,UAAU,MAAM,4BAA4B,CAAC;AAIzD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEvD,QAAA,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"static-website-construct.d.ts","sourceRoot":"","sources":["../../../../src/lib/static/apps/static-website-construct.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,KAAK,UAAU,MAAM,4BAA4B,CAAC;AAIzD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEvD,QAAA,MAAM,iBAAiB;;mBAKT,CAAC;AAEf,qBAAa,sBAAuB,SAAQ,SAAU,YAAW,YAAY;IAMzE,OAAO,CAAC,KAAK;IALf,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAY;gBAGjC,KAAK,EAAE,SAAS,EAChB,EAAE,EAAE,MAAM,EACF,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;IA2BjE,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,eAAe,CAAC;IA8DpE,gBAAgB,CAAC,cAAc,EAAE,MAAM;IAIvC,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC;IAI3C,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO;;;CAG7B"}
|
|
@@ -9,7 +9,7 @@ export type App = {
|
|
|
9
9
|
output: string;
|
|
10
10
|
buildParams?: Record<string, unknown>;
|
|
11
11
|
};
|
|
12
|
-
export type AppProperties<BuildParams = Record<string, unknown
|
|
12
|
+
export type AppProperties<BuildParams extends Record<string, unknown> = Partial<Record<string, unknown>>> = {
|
|
13
13
|
buildParams: BuildParams;
|
|
14
14
|
output: string;
|
|
15
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/static/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9E,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC3B,CAAC;AAEF,MAAM,WAAW,YAAa,SAAQ,WAAW,EAAE,WAAW;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/static/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9E,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC3B,CAAC;AAEF,MAAM,WAAW,YAAa,SAAQ,WAAW,EAAE,WAAW;CAC7D;AAED,MAAM,MAAM,GAAG,GAAG;IAChB,IAAI,EAAE,OAAO,OAAO,CAAC,gBAAgB,GAAG,OAAO,OAAO,CAAC,cAAc,CAAC;IACtE,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,aAAa,CACvB,WAAW,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,IAC5E;IACF,WAAW,EAAE,WAAW,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
|
@@ -1,32 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const ContainerAppFileSchema: z.ZodObject<{
|
|
3
3
|
key: z.ZodString;
|
|
4
|
-
},
|
|
5
|
-
key: string;
|
|
6
|
-
}, {
|
|
7
|
-
key: string;
|
|
8
|
-
}>;
|
|
4
|
+
}, z.core.$strip>;
|
|
9
5
|
export declare const ContainerAppSchema: z.ZodObject<{
|
|
10
6
|
repository: z.ZodString;
|
|
11
7
|
tag: z.ZodOptional<z.ZodString>;
|
|
12
8
|
files: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
13
9
|
key: z.ZodString;
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
}, {
|
|
17
|
-
key: string;
|
|
18
|
-
}>>>;
|
|
19
|
-
}, "strip", z.ZodTypeAny, {
|
|
20
|
-
repository: string;
|
|
21
|
-
tag?: string | undefined;
|
|
22
|
-
files?: Record<string, {
|
|
23
|
-
key: string;
|
|
24
|
-
}> | undefined;
|
|
25
|
-
}, {
|
|
26
|
-
repository: string;
|
|
27
|
-
tag?: string | undefined;
|
|
28
|
-
files?: Record<string, {
|
|
29
|
-
key: string;
|
|
30
|
-
}> | undefined;
|
|
31
|
-
}>;
|
|
10
|
+
}, z.core.$strip>>>;
|
|
11
|
+
}, z.core.$strip>;
|
|
32
12
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/lib/util/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/lib/util/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,sBAAsB;;iBAAgC,CAAC;AAEpE,eAAO,MAAM,kBAAkB;;;;;;iBAI7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-bucket.d.ts","sourceRoot":"","sources":["../../../src/lib/util/public-bucket.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,aAgBxD"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.publicBucket = publicBucket;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const s3 = tslib_1.__importStar(require("aws-cdk-lib/aws-s3"));
|
|
6
|
+
const cdk = tslib_1.__importStar(require("aws-cdk-lib"));
|
|
7
|
+
function publicBucket(scope, id) {
|
|
8
|
+
return new s3.Bucket(scope, id, {
|
|
9
|
+
removalPolicy: cdk.RemovalPolicy.DESTROY,
|
|
10
|
+
autoDeleteObjects: true,
|
|
11
|
+
blockPublicAccess: s3.BlockPublicAccess.BLOCK_ACLS_ONLY,
|
|
12
|
+
publicReadAccess: true,
|
|
13
|
+
websiteIndexDocument: 'index.html',
|
|
14
|
+
websiteErrorDocument: 'index.html',
|
|
15
|
+
cors: [
|
|
16
|
+
{
|
|
17
|
+
allowedHeaders: ['*'],
|
|
18
|
+
allowedOrigins: ['*'],
|
|
19
|
+
allowedMethods: [s3.HttpMethods.GET, s3.HttpMethods.HEAD],
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
});
|
|
23
|
+
}
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fy-stack/app-construct",
|
|
3
|
-
"version": "0.0.147-alpha.
|
|
3
|
+
"version": "0.0.147-alpha.30611",
|
|
4
4
|
"repository": "https://github.com/festusyuma/fy-stack",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@fy-stack/types": "0.0.147-alpha.
|
|
6
|
+
"@fy-stack/types": "0.0.147-alpha.30611",
|
|
7
7
|
"tslib": "^2.3.0",
|
|
8
8
|
"zod": "^4.3.6"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"aws-cdk-lib": "^2.
|
|
12
|
-
"constructs": "^10.
|
|
11
|
+
"aws-cdk-lib": "^2.243.0",
|
|
12
|
+
"constructs": "^10.5.1",
|
|
13
13
|
"cdk-ecr-deployment": "^4.1.2"
|
|
14
14
|
},
|
|
15
15
|
"main": "./dist/index.js",
|