@mbc-cqrs-serverless/cli 0.1.26-beta.0 → 0.1.27-beta.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mbc-cqrs-serverless/cli",
3
- "version": "0.1.26-beta.0",
3
+ "version": "0.1.27-beta.0",
4
4
  "description": "a CLI to get started with MBC CQRS serverless framework",
5
5
  "keywords": [
6
6
  "mbc",
@@ -49,5 +49,5 @@
49
49
  "devDependencies": {
50
50
  "@faker-js/faker": "^8.3.1"
51
51
  },
52
- "gitHead": "9dc8eb5d896303269dad8c227b12bb7d5e26dc92"
52
+ "gitHead": "34a52ba6d89eddb8724de7f0689a1c2d32b8d6a7"
53
53
  }
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ outdir: 'graph',
3
+ }
@@ -1,47 +1,42 @@
1
1
  #!/usr/bin/env node
2
- import 'source-map-support/register'
3
2
  import * as cdk from 'aws-cdk-lib'
4
- // import { InfraStack } from '../libs/infra-stack'
5
-
6
- // import * as dotenv from 'dotenv'
7
- // import { Env } from '../config/type'
8
- // import { getConfig } from '../config'
9
- import { PipelineStack } from '../libs/pipeline-stack'
3
+ import 'source-map-support/register'
10
4
  import { Env, PIPELINE_NAME } from '../config'
11
- // dotenv.config()
12
-
13
- const app = new cdk.App()
14
-
15
- // const env: Env = app.node.tryGetContext('env') || 'dev'
16
- // console.log('stack environment:', env)
17
- // const config = getConfig(env)
18
-
19
- const cdkEnv: cdk.Environment = {
20
- account: '',
21
- region: '',
22
- }
23
-
24
- // new InfraStack(app, 'InfraStack', {
25
- // config,
26
- // /* If you don't specify 'env', this stack will be environment-agnostic.
27
- // * Account/Region-dependent features and context lookups will not work,
28
- // * but a single synthesized template can be deployed anywhere. */
29
- // /* Uncomment the next line to specialize this stack for the AWS Account
30
- // * and Region that are implied by the current CLI configuration. */
31
- // // env: { account: process.env.CDK_DEFAULT_ACCOUNT, region: process.env.CDK_DEFAULT_REGION },
32
- // /* Uncomment the next line if you know exactly what Account and Region you
33
- // * want to deploy the stack to. */
34
- // env: cdkEnv,
35
- // /* For more information, see https://docs.aws.amazon.com/cdk/latest/guide/environments.html */
36
- // })
37
-
38
- const envs: Env[] = ['dev']
39
-
40
- for (const env of envs) {
41
- new PipelineStack(app, env + '-' + PIPELINE_NAME + '-pipeline-stack', {
42
- env: cdkEnv,
43
- envName: env,
5
+ import { PipelineStack } from '../libs/pipeline-stack'
6
+ import { CdkGraph, FilterPreset } from '@aws/pdk/cdk-graph'
7
+ import { CdkGraphDiagramPlugin } from '@aws/pdk/cdk-graph-plugin-diagram'
8
+ ;(async () => {
9
+ const app = new cdk.App()
10
+
11
+ const cdkEnv: cdk.Environment = {
12
+ account: '',
13
+ region: '',
14
+ }
15
+
16
+ const envs: Env[] = ['dev']
17
+
18
+ for (const env of envs) {
19
+ new PipelineStack(app, env + '-' + PIPELINE_NAME + '-pipeline-stack', {
20
+ env: cdkEnv,
21
+ envName: env,
22
+ })
23
+ }
24
+
25
+ const graph = new CdkGraph(app, {
26
+ plugins: [
27
+ new CdkGraphDiagramPlugin({
28
+ diagrams: [
29
+ {
30
+ name: 'diagram',
31
+ title: 'Infrastructure diagram',
32
+ theme: 'light',
33
+ },
34
+ ],
35
+ }),
36
+ ],
44
37
  })
45
- }
46
38
 
47
- app.synth()
39
+ app.synth()
40
+
41
+ await graph.report()
42
+ })()
@@ -1,8 +1,12 @@
1
1
  *.js
2
2
  !jest.config.js
3
+ !.cdkgraphrc.js
3
4
  *.d.ts
4
5
  node_modules
5
6
 
6
7
  # CDK asset staging directory
7
8
  .cdk.staging
8
- cdk.out
9
+ cdk.out
10
+
11
+ #
12
+ graph
@@ -25,6 +25,7 @@
25
25
  "@aws-cdk/aws-apigatewayv2-alpha": "^2.114.1-alpha.0",
26
26
  "@aws-cdk/aws-apigatewayv2-authorizers-alpha": "^2.114.1-alpha.0",
27
27
  "@aws-cdk/aws-apigatewayv2-integrations-alpha": "^2.114.1-alpha.0",
28
+ "@aws/pdk": "^0.25.7",
28
29
  "aws-cdk-lib": "^2.147.0",
29
30
  "cdk-ecr-deployment": "^3.0.71",
30
31
  "constructs": "^10.3.0",