@fy-stack/fullstack-construct 0.0.126 → 0.0.128
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fullstack-construct.d.ts","sourceRoot":"","sources":["../../src/lib/fullstack-construct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EACL,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"fullstack-construct.d.ts","sourceRoot":"","sources":["../../src/lib/fullstack-construct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EACL,KAAK,YAAY,EAMlB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAW,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAU3D,qBAAa,kBAAmB,SAAQ,SAAS;IACxC,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IACpC,GAAG,CAAC,EAAE,YAAY,CAAC;IACnB,GAAG,CAAC,EAAE,mBAAmB,CAAC;IAC1B,MAAM,EAAE,gBAAgB,CAAC;gBAEpB,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,uBAAuB;CA8GzE"}
|
|
@@ -13,6 +13,7 @@ const constructs_1 = require("constructs");
|
|
|
13
13
|
const types_1 = require("./types");
|
|
14
14
|
const AppBuilds = {
|
|
15
15
|
[types_1.AppType.NEXT_APP_ROUTER]: app_construct_1.NextAppRouterConstruct,
|
|
16
|
+
[types_1.AppType.NEXT_PAGE_EXPORT]: app_construct_1.NextPagesExportConstruct,
|
|
16
17
|
[types_1.AppType.NODE_APP]: app_construct_1.NodeAppConstruct,
|
|
17
18
|
[types_1.AppType.NODE_API]: app_construct_1.NodeApiConstruct,
|
|
18
19
|
[types_1.AppType.IMAGE_APP]: app_construct_1.ImageAppConstruct,
|
|
@@ -73,6 +74,7 @@ class FullStackConstruct extends constructs_1.Construct {
|
|
|
73
74
|
if (props.cdn) {
|
|
74
75
|
this.cdn = new cdn_construct_1.CDNConstruct(this, 'CDNConstruct', {
|
|
75
76
|
routes: props.cdn.routes,
|
|
77
|
+
domains: props.cdn.domains,
|
|
76
78
|
resources: { ...this.apps, uploads: this.storage },
|
|
77
79
|
});
|
|
78
80
|
}
|
|
@@ -90,12 +92,18 @@ class FullStackConstruct extends constructs_1.Construct {
|
|
|
90
92
|
event: this.event,
|
|
91
93
|
};
|
|
92
94
|
for (const i in props.apps) {
|
|
93
|
-
|
|
95
|
+
const attachments = Object.entries(props.apps[i]?.attachment ?? {})
|
|
94
96
|
.map(([key]) => [key, resources[key]])
|
|
95
|
-
.filter((v) => !!v)
|
|
96
|
-
|
|
97
|
+
.filter((v) => !!v);
|
|
98
|
+
if (attachments.length) {
|
|
99
|
+
this.apps?.[i]?.attach(Object.fromEntries(attachments));
|
|
100
|
+
}
|
|
101
|
+
const grants = (props.apps[i]?.grant
|
|
97
102
|
?.map((val) => resources[val])
|
|
98
|
-
.filter((v) => !!v) ?? [])
|
|
103
|
+
.filter((v) => !!v) ?? []);
|
|
104
|
+
if (grants.length) {
|
|
105
|
+
this.apps?.[i]?.grant(...grants);
|
|
106
|
+
}
|
|
99
107
|
}
|
|
100
108
|
}
|
|
101
109
|
}
|
package/dist/lib/types.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { DatabaseConstructProps } from '@fy-stack/database-construct';
|
|
2
2
|
import { ResourceRef } from '@fy-stack/types';
|
|
3
3
|
import * as events from 'aws-cdk-lib/aws-events';
|
|
4
|
+
import { CDNConstructProps } from '@fy-stack/cdn-construct';
|
|
4
5
|
export declare enum AppType {
|
|
5
6
|
NODE_APP = "nodeApp",
|
|
6
7
|
NODE_API = "nestApi",
|
|
7
8
|
IMAGE_APP = "imageApp",
|
|
8
|
-
NEXT_APP_ROUTER = "nextAppRouter"
|
|
9
|
+
NEXT_APP_ROUTER = "nextAppRouter",
|
|
10
|
+
NEXT_PAGE_EXPORT = "nextPageExport"
|
|
9
11
|
}
|
|
10
12
|
export type AppAttachment = {
|
|
11
13
|
auth?: boolean;
|
|
@@ -51,9 +53,7 @@ export type FullStackConstructProps = {
|
|
|
51
53
|
messages?: AppMessage[];
|
|
52
54
|
cron?: AppCron[];
|
|
53
55
|
};
|
|
54
|
-
cdn?:
|
|
55
|
-
routes: Record<string, ResourceRef>;
|
|
56
|
-
};
|
|
56
|
+
cdn?: Omit<CDNConstructProps, "resources">;
|
|
57
57
|
api?: {
|
|
58
58
|
routes: Record<string, ResourceRef>;
|
|
59
59
|
};
|
package/dist/lib/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lib/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAA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AC1B,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAC7B,OAAO,CAAC,EAAE;QAAE,cAAc,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IACvC,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,MAAM,CAAC,EAAE;QACP,QAAQ,CAAC,EAAE,UAAU,EAAE,CAAC;QACxB,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC;KAClB,CAAC;IACF,GAAG,CAAC,EAAE,IAAI,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC;IAC3C,GAAG,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;KAAE,CAAC;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;CAC9C,CAAC"}
|
package/dist/lib/types.js
CHANGED
|
@@ -7,6 +7,7 @@ var AppType;
|
|
|
7
7
|
AppType["NODE_API"] = "nestApi";
|
|
8
8
|
AppType["IMAGE_APP"] = "imageApp";
|
|
9
9
|
AppType["NEXT_APP_ROUTER"] = "nextAppRouter";
|
|
10
|
+
AppType["NEXT_PAGE_EXPORT"] = "nextPageExport";
|
|
10
11
|
})(AppType || (exports.AppType = AppType = {}));
|
|
11
12
|
var AppGrant;
|
|
12
13
|
(function (AppGrant) {
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fy-stack/fullstack-construct",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.128",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"tslib": "^2.3.0",
|
|
6
|
-
"@fy-stack/auth-construct": "0.0.
|
|
7
|
-
"@fy-stack/storage-construct": "0.0.
|
|
8
|
-
"@fy-stack/database-construct": "0.0.
|
|
9
|
-
"@fy-stack/event-construct": "0.0.
|
|
10
|
-
"@fy-stack/secret-construct": "0.0.
|
|
11
|
-
"@fy-stack/cdn-construct": "0.0.
|
|
12
|
-
"@fy-stack/apigateway-construct": "0.0.
|
|
13
|
-
"@fy-stack/types": "0.0.
|
|
14
|
-
"@fy-stack/app-construct": "0.0.
|
|
6
|
+
"@fy-stack/auth-construct": "0.0.128",
|
|
7
|
+
"@fy-stack/storage-construct": "0.0.128",
|
|
8
|
+
"@fy-stack/database-construct": "0.0.128",
|
|
9
|
+
"@fy-stack/event-construct": "0.0.128",
|
|
10
|
+
"@fy-stack/secret-construct": "0.0.128",
|
|
11
|
+
"@fy-stack/cdn-construct": "0.0.128",
|
|
12
|
+
"@fy-stack/apigateway-construct": "0.0.128",
|
|
13
|
+
"@fy-stack/types": "0.0.128",
|
|
14
|
+
"@fy-stack/app-construct": "0.0.128"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"aws-cdk-lib": "2.166.0",
|