@fy-stack/fullstack-construct 0.0.121 → 0.0.122
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 +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/lib/fullstack-construct.d.ts +7 -5
- package/dist/lib/fullstack-construct.d.ts.map +1 -1
- package/dist/lib/fullstack-construct.js +21 -10
- package/dist/lib/types.d.ts +5 -8
- package/dist/lib/types.d.ts.map +1 -1
- package/dist/lib/types.js +1 -6
- package/package.json +10 -9
package/dist/index.d.ts
CHANGED
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,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,KAAK,aAAa,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AppType = exports.
|
|
3
|
+
exports.AppType = exports.AppGrant = exports.FullStackConstruct = void 0;
|
|
4
4
|
var fullstack_construct_1 = require("./lib/fullstack-construct");
|
|
5
5
|
Object.defineProperty(exports, "FullStackConstruct", { enumerable: true, get: function () { return fullstack_construct_1.FullStackConstruct; } });
|
|
6
6
|
var types_1 = require("./lib/types");
|
|
7
7
|
Object.defineProperty(exports, "AppGrant", { enumerable: true, get: function () { return types_1.AppGrant; } });
|
|
8
|
-
Object.defineProperty(exports, "AppResourceType", { enumerable: true, get: function () { return types_1.AppResourceType; } });
|
|
9
8
|
Object.defineProperty(exports, "AppType", { enumerable: true, get: function () { return types_1.AppType; } });
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FullStackConstructProps } from './types';
|
|
1
|
+
import { type AppConstruct } from '@fy-stack/app-construct';
|
|
3
2
|
import { AuthConstruct } from '@fy-stack/auth-construct';
|
|
4
|
-
import {
|
|
3
|
+
import { CDNConstruct } from '@fy-stack/cdn-construct';
|
|
5
4
|
import { DatabaseConstruct } from '@fy-stack/database-construct';
|
|
6
5
|
import { EventConstruct } from '@fy-stack/event-construct';
|
|
7
6
|
import { SecretsConstruct } from '@fy-stack/secret-construct';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { StorageConstruct } from '@fy-stack/storage-construct';
|
|
8
|
+
import { Construct } from 'constructs';
|
|
9
|
+
import { FullStackConstructProps } from './types';
|
|
10
|
+
import { ApiGatewayConstruct } from '@fy-stack/apigateway-construct';
|
|
10
11
|
export declare class FullStackConstruct extends Construct {
|
|
11
12
|
auth?: AuthConstruct;
|
|
12
13
|
storage?: StorageConstruct;
|
|
@@ -14,6 +15,7 @@ export declare class FullStackConstruct extends Construct {
|
|
|
14
15
|
event?: EventConstruct;
|
|
15
16
|
apps?: Record<string, AppConstruct>;
|
|
16
17
|
cdn?: CDNConstruct;
|
|
18
|
+
api?: ApiGatewayConstruct;
|
|
17
19
|
secret: SecretsConstruct;
|
|
18
20
|
constructor(scope: Construct, id: string, props: FullStackConstructProps);
|
|
19
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fullstack-construct.d.ts","sourceRoot":"","sources":["../../src/lib/fullstack-construct.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fullstack-construct.d.ts","sourceRoot":"","sources":["../../src/lib/fullstack-construct.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EAIlB,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;AAE/D,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAW,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAQrE,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;CAyHzE"}
|
|
@@ -2,16 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FullStackConstruct = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
6
|
-
const constructs_1 = require("constructs");
|
|
7
|
-
const types_1 = require("./types");
|
|
5
|
+
const app_construct_1 = require("@fy-stack/app-construct");
|
|
8
6
|
const auth_construct_1 = require("@fy-stack/auth-construct");
|
|
9
|
-
const
|
|
7
|
+
const cdn_construct_1 = require("@fy-stack/cdn-construct");
|
|
10
8
|
const database_construct_1 = require("@fy-stack/database-construct");
|
|
11
9
|
const event_construct_1 = require("@fy-stack/event-construct");
|
|
12
10
|
const secret_construct_1 = require("@fy-stack/secret-construct");
|
|
13
|
-
const
|
|
14
|
-
const
|
|
11
|
+
const storage_construct_1 = require("@fy-stack/storage-construct");
|
|
12
|
+
const cdk = tslib_1.__importStar(require("aws-cdk-lib"));
|
|
13
|
+
const constructs_1 = require("constructs");
|
|
14
|
+
const types_1 = require("./types");
|
|
15
|
+
const apigateway_construct_1 = require("@fy-stack/apigateway-construct");
|
|
15
16
|
const AppBuilds = {
|
|
16
17
|
[types_1.AppType.NEXT_APP_ROUTER]: app_construct_1.NextAppRouterConstruct,
|
|
17
18
|
[types_1.AppType.NEST]: app_construct_1.NestConstruct,
|
|
@@ -24,6 +25,7 @@ class FullStackConstruct extends constructs_1.Construct {
|
|
|
24
25
|
event;
|
|
25
26
|
apps;
|
|
26
27
|
cdn;
|
|
28
|
+
api;
|
|
27
29
|
secret;
|
|
28
30
|
constructor(scope, id, props) {
|
|
29
31
|
super(scope, id);
|
|
@@ -75,14 +77,23 @@ class FullStackConstruct extends constructs_1.Construct {
|
|
|
75
77
|
if (props.cdn) {
|
|
76
78
|
this.cdn = new cdn_construct_1.CDNConstruct(this, 'CDNStack', {
|
|
77
79
|
routes: props.cdn.routes,
|
|
78
|
-
|
|
79
|
-
resources: { uploads: this.storage },
|
|
80
|
+
resources: { ...this.apps, uploads: this.storage },
|
|
80
81
|
});
|
|
81
|
-
new cdk.CfnOutput(this, '
|
|
82
|
-
key: '
|
|
82
|
+
new cdk.CfnOutput(this, 'CDN Url', {
|
|
83
|
+
key: 'cdnUrl',
|
|
83
84
|
value: 'https://' + this.cdn.distribution.domainName,
|
|
84
85
|
});
|
|
85
86
|
}
|
|
87
|
+
if (props.api) {
|
|
88
|
+
this.api = new apigateway_construct_1.ApiGatewayConstruct(this, 'CDNStack', {
|
|
89
|
+
routes: props.api.routes,
|
|
90
|
+
resources: this.apps,
|
|
91
|
+
});
|
|
92
|
+
new cdk.CfnOutput(this, 'Api Url', {
|
|
93
|
+
key: 'apiUrl',
|
|
94
|
+
value: this.api.api.apiEndpoint,
|
|
95
|
+
});
|
|
96
|
+
}
|
|
86
97
|
const resources = {
|
|
87
98
|
storage: this.storage,
|
|
88
99
|
database: this.database,
|
package/dist/lib/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ResourceRef } from '@fy-stack/types';
|
|
1
2
|
import * as events from 'aws-cdk-lib/aws-events';
|
|
2
3
|
export declare enum AppType {
|
|
3
4
|
NEST = "nest",
|
|
@@ -27,16 +28,9 @@ export type App = {
|
|
|
27
28
|
grant?: AppGrant[];
|
|
28
29
|
command: string;
|
|
29
30
|
};
|
|
30
|
-
export declare enum AppResourceType {
|
|
31
|
-
UPLOADS = "uploads",
|
|
32
|
-
AUTH = "auth"
|
|
33
|
-
}
|
|
34
31
|
export type AppRef = {
|
|
35
32
|
$app: string;
|
|
36
33
|
};
|
|
37
|
-
export type ResourceRef = {
|
|
38
|
-
$resource: AppResourceType;
|
|
39
|
-
};
|
|
40
34
|
export type AppMessage = AppRef & {
|
|
41
35
|
messages: string[];
|
|
42
36
|
publish?: boolean;
|
|
@@ -60,7 +54,10 @@ export type FullStackConstructProps = {
|
|
|
60
54
|
cron?: AppCron[];
|
|
61
55
|
};
|
|
62
56
|
cdn?: {
|
|
63
|
-
routes: Record<string,
|
|
57
|
+
routes: Record<string, ResourceRef>;
|
|
58
|
+
};
|
|
59
|
+
api?: {
|
|
60
|
+
routes: Record<string, ResourceRef>;
|
|
64
61
|
};
|
|
65
62
|
secrets?: Record<string, string | undefined>;
|
|
66
63
|
};
|
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,KAA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AAE,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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.AppGrant = exports.AppType = void 0;
|
|
4
4
|
var AppType;
|
|
5
5
|
(function (AppType) {
|
|
6
6
|
AppType["NEST"] = "nest";
|
|
@@ -15,8 +15,3 @@ var AppGrant;
|
|
|
15
15
|
AppGrant["SECRETS"] = "secrets";
|
|
16
16
|
AppGrant["EVENT"] = "event";
|
|
17
17
|
})(AppGrant || (exports.AppGrant = AppGrant = {}));
|
|
18
|
-
var AppResourceType;
|
|
19
|
-
(function (AppResourceType) {
|
|
20
|
-
AppResourceType["UPLOADS"] = "uploads";
|
|
21
|
-
AppResourceType["AUTH"] = "auth";
|
|
22
|
-
})(AppResourceType || (exports.AppResourceType = AppResourceType = {}));
|
package/package.json
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fy-stack/fullstack-construct",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.122",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"tslib": "^2.3.0",
|
|
6
|
-
"@fy-stack/
|
|
7
|
-
"@fy-stack/
|
|
8
|
-
"@fy-stack/
|
|
9
|
-
"@fy-stack/
|
|
10
|
-
"@fy-stack/
|
|
11
|
-
"@fy-stack/
|
|
12
|
-
"@fy-stack/
|
|
13
|
-
"@fy-stack/types": "0.0.
|
|
6
|
+
"@fy-stack/auth-construct": "0.0.122",
|
|
7
|
+
"@fy-stack/storage-construct": "0.0.122",
|
|
8
|
+
"@fy-stack/database-construct": "0.0.122",
|
|
9
|
+
"@fy-stack/event-construct": "0.0.122",
|
|
10
|
+
"@fy-stack/secret-construct": "0.0.122",
|
|
11
|
+
"@fy-stack/cdn-construct": "0.0.122",
|
|
12
|
+
"@fy-stack/apigateway-construct": "0.0.122",
|
|
13
|
+
"@fy-stack/types": "0.0.122",
|
|
14
|
+
"@fy-stack/app-construct": "0.0.122"
|
|
14
15
|
},
|
|
15
16
|
"peerDependencies": {
|
|
16
17
|
"aws-cdk-lib": "2.164.1",
|