@datapith/cdk4j-diagram 0.4.1
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/BUILD.md +12 -0
- package/commands/asciiart/index.js +58 -0
- package/commands/asciiart/mxgraph-to-asciiart.js +203 -0
- package/commands/browse/index.js +61 -0
- package/commands/draw.io/index.js +40 -0
- package/commands/html/index.js +40 -0
- package/commands/mermaid/index.js +100 -0
- package/graph/MxGenerator.js +400 -0
- package/graph/Vis.js +231 -0
- package/graph/ui/icons.js +228 -0
- package/graph/ui/index.html +164 -0
- package/graph/ui/index_standalone.template +166 -0
- package/index.js +10 -0
- package/index.spec.js +36 -0
- package/package.json +61 -0
- package/resources/FilterConfig.js +9 -0
- package/resources/IconMap.js +330 -0
- package/resources/JsonUtil.js +186 -0
- package/shared/templateCache.js +6 -0
- package/shared/templateParser.js +128 -0
- package/tests/resources/JsonUtil.spec.js +32 -0
- package/tests/template.json +143 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
{
|
|
2
|
+
"AWSTemplateFormatVersion": "2010-09-09",
|
|
3
|
+
"Transform": [
|
|
4
|
+
"AWS::Serverless-2016-10-31"
|
|
5
|
+
],
|
|
6
|
+
"Globals": {
|
|
7
|
+
"Function": {
|
|
8
|
+
"Runtime": "nodejs12.x"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"Resources": {
|
|
12
|
+
"Function1": {
|
|
13
|
+
"Type": "AWS::Serverless::Function",
|
|
14
|
+
"Properties": {
|
|
15
|
+
"CodeUri": ".",
|
|
16
|
+
"Handler": "src/EventConsumer.handler",
|
|
17
|
+
"Events": {
|
|
18
|
+
"MyTestRule": {
|
|
19
|
+
"Type": "EventBridgeRule",
|
|
20
|
+
"Properties": {
|
|
21
|
+
"InputPath": "$.detail.data",
|
|
22
|
+
"EventBusName": "commerce",
|
|
23
|
+
"Pattern": {
|
|
24
|
+
"source": [
|
|
25
|
+
"evb-test"
|
|
26
|
+
],
|
|
27
|
+
"detail-type": [
|
|
28
|
+
"fruit-event"
|
|
29
|
+
],
|
|
30
|
+
"detail": {
|
|
31
|
+
"data": {
|
|
32
|
+
"fruit": [
|
|
33
|
+
{
|
|
34
|
+
"prefix": "pe"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"Function2": {
|
|
46
|
+
"Type": "AWS::Serverless::Function",
|
|
47
|
+
"Properties": {
|
|
48
|
+
"CodeUri": ".",
|
|
49
|
+
"Handler": "src/EventHose.handler",
|
|
50
|
+
"Policies": [
|
|
51
|
+
{
|
|
52
|
+
"EventBridgePutEventsPolicy": {
|
|
53
|
+
"EventBusName": "mybus"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"DynamoDBCrudPolicy": {
|
|
58
|
+
"TableName": {
|
|
59
|
+
"Ref": "DynamoTable"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"SNSPublishMessagePolicy": {
|
|
65
|
+
"TopicName": {
|
|
66
|
+
"Fn::GetAtt": [
|
|
67
|
+
"Topic",
|
|
68
|
+
"TopicName"
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"Environment": {
|
|
75
|
+
"Variables": {
|
|
76
|
+
"StackName": {
|
|
77
|
+
"Ref": "AWS::StackName"
|
|
78
|
+
},
|
|
79
|
+
"JoinedThing": {
|
|
80
|
+
"Fn::Join": [
|
|
81
|
+
",",
|
|
82
|
+
[
|
|
83
|
+
{
|
|
84
|
+
"Ref": "Topic"
|
|
85
|
+
},
|
|
86
|
+
"woo"
|
|
87
|
+
]
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
"SubbedThing": {
|
|
91
|
+
"Fn::Sub": "${DynamoTable.Arn}-${Function1.Arn}-${AWS::StackName}"
|
|
92
|
+
},
|
|
93
|
+
"JoinedWithRef": {
|
|
94
|
+
"Fn::Join": [
|
|
95
|
+
"",
|
|
96
|
+
[
|
|
97
|
+
"arn:",
|
|
98
|
+
{
|
|
99
|
+
"Ref": "AWS::Partition"
|
|
100
|
+
},
|
|
101
|
+
":apigateway:",
|
|
102
|
+
{
|
|
103
|
+
"Ref": "AWS::Region"
|
|
104
|
+
},
|
|
105
|
+
":lambda:path/2015-03-31/functions/",
|
|
106
|
+
{
|
|
107
|
+
"Fn::GetAtt": [
|
|
108
|
+
"Function1",
|
|
109
|
+
"Arn"
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
"/invocations"
|
|
113
|
+
]
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"DynamoTable": {
|
|
121
|
+
"Type": "AWS::DynamoDB::Table",
|
|
122
|
+
"Properties": {
|
|
123
|
+
"BillingMode": "PAY_PER_REQUEST",
|
|
124
|
+
"AttributeDefinitions": [
|
|
125
|
+
{
|
|
126
|
+
"AttributeName": "Id",
|
|
127
|
+
"AttributeType": "N"
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"KeySchema": [
|
|
131
|
+
{
|
|
132
|
+
"AttributeName": "Id",
|
|
133
|
+
"KeyType": "HASH"
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"Topic": {
|
|
139
|
+
"Type": "AWS::SNS::Topic"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"Outputs": {}
|
|
143
|
+
}
|