@lafken/main 0.6.4 → 0.7.0
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/README.md +1 -1
- package/lib/app/app.d.ts +1 -1
- package/lib/app/app.js +5 -5
- package/lib/app/app.types.d.ts +1 -1
- package/lib/aspect/aspect.d.ts +1 -1
- package/lib/module/module.js +2 -2
- package/package.json +35 -14
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @lafken/main
|
|
2
2
|
|
|
3
|
-
This is the core entry point of an Lafken application. Internally, it initializes the @
|
|
3
|
+
This is the core entry point of an Lafken application. Internally, it initializes the @cdktn/provider-aws, allowing you to register resolvers, modules, and global configuration. It orchestrates the creation of all the infrastructure required for a fully serverless application.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
package/lib/app/app.d.ts
CHANGED
package/lib/app/app.js
CHANGED
|
@@ -4,16 +4,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.createApp = exports.AppStack = void 0;
|
|
7
|
-
const provider_1 = require("@
|
|
7
|
+
const provider_1 = require("@cdktn/provider-aws/lib/provider");
|
|
8
8
|
const common_1 = require("@lafken/common");
|
|
9
9
|
const resolver_1 = require("@lafken/resolver");
|
|
10
|
-
const
|
|
10
|
+
const cdktn_1 = require("cdktn");
|
|
11
11
|
const pretty_error_1 = __importDefault(require("pretty-error"));
|
|
12
12
|
const aspect_1 = require("../aspect/aspect");
|
|
13
13
|
const context_1 = require("../context/context");
|
|
14
14
|
(0, common_1.enableBuildEnvVariable)();
|
|
15
15
|
new pretty_error_1.default().start();
|
|
16
|
-
class AppStack extends
|
|
16
|
+
class AppStack extends cdktn_1.TerraformStack {
|
|
17
17
|
id;
|
|
18
18
|
props;
|
|
19
19
|
constructor(scope, id, props) {
|
|
@@ -74,7 +74,7 @@ class AppStack extends cdktf_1.TerraformStack {
|
|
|
74
74
|
lambdaRole.isGlobal('app', roleName);
|
|
75
75
|
}
|
|
76
76
|
addAspectProperties() {
|
|
77
|
-
|
|
77
|
+
cdktn_1.Aspects.of(this).add(new aspect_1.AppAspect({
|
|
78
78
|
tags: {
|
|
79
79
|
...(this.props.globalConfig?.tags || {}),
|
|
80
80
|
'lafken:app': this.id,
|
|
@@ -84,7 +84,7 @@ class AppStack extends cdktf_1.TerraformStack {
|
|
|
84
84
|
}
|
|
85
85
|
exports.AppStack = AppStack;
|
|
86
86
|
const createApp = async (props) => {
|
|
87
|
-
const app = new
|
|
87
|
+
const app = new cdktn_1.App({
|
|
88
88
|
skipValidation: true,
|
|
89
89
|
});
|
|
90
90
|
const appStack = new AppStack(app, props.name, props);
|
package/lib/app/app.types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AwsProviderConfig } from '@
|
|
1
|
+
import type { AwsProviderConfig } from '@cdktn/provider-aws/lib/provider';
|
|
2
2
|
import type { LambdaGlobalConfig, ResolverType } from '@lafken/resolver';
|
|
3
3
|
import type { StackModule } from '../module';
|
|
4
4
|
import type { ModuleResolverType } from '../module/module.types';
|
package/lib/aspect/aspect.d.ts
CHANGED
package/lib/module/module.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createModule = exports.StackModule = void 0;
|
|
4
4
|
const common_1 = require("@lafken/common");
|
|
5
5
|
const resolver_1 = require("@lafken/resolver");
|
|
6
|
-
const
|
|
6
|
+
const cdktn_1 = require("cdktn");
|
|
7
7
|
const constructs_1 = require("constructs");
|
|
8
8
|
const aspect_1 = require("../aspect/aspect");
|
|
9
9
|
const context_1 = require("../context/context");
|
|
@@ -45,7 +45,7 @@ class StackModule extends constructs_1.Construct {
|
|
|
45
45
|
lambdaRole.isGlobal('module', roleName);
|
|
46
46
|
}
|
|
47
47
|
addAspectProperties() {
|
|
48
|
-
|
|
48
|
+
cdktn_1.Aspects.of(this).add(new aspect_1.AppAspect({
|
|
49
49
|
tags: {
|
|
50
50
|
...(this.props.globalConfig?.tags || {}),
|
|
51
51
|
'lafken:module': this.props.name,
|
package/package.json
CHANGED
|
@@ -1,35 +1,56 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lafken/main",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"private": false,
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Lafken core engine - orchestrate AWS serverless infrastructure using decorators with automatic CDKTN code generation",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"aws",
|
|
8
8
|
"serverless",
|
|
9
9
|
"lafken",
|
|
10
10
|
"infrastructure",
|
|
11
|
-
"
|
|
11
|
+
"infrastructure-as-code",
|
|
12
|
+
"cdktn",
|
|
13
|
+
"typescript",
|
|
14
|
+
"decorators",
|
|
15
|
+
"terraform"
|
|
12
16
|
],
|
|
17
|
+
"homepage": "https://github.com/Hero64/lafken#readme",
|
|
18
|
+
"bugs": "https://github.com/Hero64/lafken/issues",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "https://github.com/Hero64/lafken",
|
|
22
|
+
"directory": "packages/main"
|
|
23
|
+
},
|
|
13
24
|
"license": "MIT",
|
|
25
|
+
"author": "Aníbal Jorquera",
|
|
14
26
|
"main": "lib/index.js",
|
|
15
27
|
"types": "lib/index.d.ts",
|
|
16
28
|
"files": [
|
|
17
29
|
"lib"
|
|
18
30
|
],
|
|
19
31
|
"dependencies": {
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"pretty-error": "4.0.0",
|
|
24
|
-
"reflect-metadata": "0.2.2",
|
|
25
|
-
"@lafken/common": "0.6.4",
|
|
26
|
-
"@lafken/resolver": "0.6.4"
|
|
32
|
+
"pretty-error": "^4.0.0",
|
|
33
|
+
"reflect-metadata": "^0.2.2",
|
|
34
|
+
"@lafken/resolver": "0.7.0"
|
|
27
35
|
},
|
|
28
36
|
"devDependencies": {
|
|
29
|
-
"@
|
|
30
|
-
"jest": "30.
|
|
31
|
-
"
|
|
32
|
-
"
|
|
37
|
+
"@cdktn/provider-aws": "^23.0.0",
|
|
38
|
+
"@types/jest": "^30.0.0",
|
|
39
|
+
"cdktn": "^0.22.0",
|
|
40
|
+
"constructs": "^10.4.5",
|
|
41
|
+
"jest": "^30.2.0",
|
|
42
|
+
"ts-jest": "^29.4.6",
|
|
43
|
+
"ts-node": "^10.9.2",
|
|
44
|
+
"@lafken/common": "0.7.0"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"@cdktn/provider-aws": "^23.0.0",
|
|
48
|
+
"@lafken/common": "^0.7.0",
|
|
49
|
+
"cdktn": "^0.22.0",
|
|
50
|
+
"constructs": "^10.4.5"
|
|
51
|
+
},
|
|
52
|
+
"engines": {
|
|
53
|
+
"node": ">=20.19"
|
|
33
54
|
},
|
|
34
55
|
"publishConfig": {
|
|
35
56
|
"access": "public"
|