cdk-metadata-decode 1.0.1 → 1.0.2
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 +18 -0
- package/cdk-decode.bash +32 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,3 +32,21 @@ ALL CDK MetaData
|
|
|
32
32
|
]
|
|
33
33
|
|
|
34
34
|
```
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Bash Example
|
|
38
|
+
```bash
|
|
39
|
+
bash cdk-decode.bash v2:deflate64:H4sIAAAAAAAA/zWMyw6CMBBFv4V9HSiYuPUV1wY/wIztGKvtlPQhUcK/CxpX995zk9NABVJWxRrdm8vOdGQNU4Q9dda/HHE6JVQPIUGuaqgK59kr/YBhd+UjBnSUKIhp7Dxrk4xn0VL0OSgS2MfzYNFdNMIhs5rfLUYSyvqse0zqBsPGYnCz4FvGUUyimEJWaYZ/1yjYa4J7LJ9yCbWEprhHYxYhczKOoP3lB2nZwtTOAAAA
|
|
40
|
+
|
|
41
|
+
NODEJS Version
|
|
42
|
+
node.js/v14.21.3!jsii-runtime.Runtime
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
bash cdk-decode.bash v2:deflate64:H4sIAAAAAAAA/zWMyw6CMBBFv4V9HSiYuPUV1wY/wIztGKvtlPQhUcK/CxpX995zk9NABVJWxRrdm8vOdGQNU4Q9dda/HHE6JVQPIUGuaqgK59kr/YBhd+UjBnSUKIhp7Dxrk4xn0VL0OSgS2MfzYNFdNMIhs5rfLUYSyvqse0zqBsPGYnCz4FvGUUyimEJWaYZ/1yjYa4J7LJ9yCbWEprhHYxYhczKOoP3lB2nZwtTOAAAA -v
|
|
46
|
+
|
|
47
|
+
NODEJS Version
|
|
48
|
+
node.js/v14.21.3!jsii-runtime.Runtime
|
|
49
|
+
|
|
50
|
+
print ALL CDK MetaData
|
|
51
|
+
3.0.110!@amzn/pipelines.DeploymentStack,1.172.0!monocdk.{CfnParameter,CfnCondition,Resource,aws_{lambda.FunctionBase,cloudwatch.{Alarm,CfnAlarm}},Construct,CfnResource},node.js/v14.21.3!jsii-runtime.Runtime
|
|
52
|
+
```
|
package/cdk-decode.bash
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
RED='\033[0;31m'
|
|
4
|
+
GREEN='\033[0;32m'
|
|
5
|
+
YELLOW='\033[0;33m'
|
|
6
|
+
ENDCOLOR='\033[0m'
|
|
7
|
+
|
|
8
|
+
analytics="$1"
|
|
9
|
+
|
|
10
|
+
if [[ -z $1 ]];then
|
|
11
|
+
exit 1
|
|
12
|
+
fi
|
|
13
|
+
analytics_string=$(echo "$analytics" | cut -d':' -f3 | base64 --decode | gunzip -c )
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
echo ""
|
|
17
|
+
# 使用 cut 和 grep 提取包含 "node.js" 的部分
|
|
18
|
+
IFS=',' read -ra array <<< "$analytics_string"
|
|
19
|
+
|
|
20
|
+
# 在数组中查找包含 "node.js" 的元素
|
|
21
|
+
for element in "${array[@]}"; do
|
|
22
|
+
if [[ $element == *"node.js"* ]]; then
|
|
23
|
+
echo -e "NODEJS Version"
|
|
24
|
+
echo -e "${YELLOW}$element${ENDCOLOR}"
|
|
25
|
+
fi
|
|
26
|
+
done
|
|
27
|
+
|
|
28
|
+
if [[ ! -z $2 ]];then
|
|
29
|
+
echo ""
|
|
30
|
+
echo -e "${RED}print ALL CDK MetaData${ENDCOLOR}"
|
|
31
|
+
echo -e "${GREEN}$analytics_string${ENDCOLOR}"
|
|
32
|
+
fi
|