@mavogel/cdk-vscode-server 0.0.48 → 0.0.50
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/.claude/hooks/file_checker.sh +175 -0
- package/.jsii +58 -45
- package/.qlty/.gitignore +7 -0
- package/.qlty/configs/.yamllint.yaml +21 -0
- package/.qlty/qlty.toml +115 -0
- package/CLAUDE.md +159 -0
- package/lib/vscode-server.js +1 -1
- package/mavogelcdkvscodeserver/go.mod +5 -6
- package/mavogelcdkvscodeserver/jsii/jsii.go +2 -2
- package/mavogelcdkvscodeserver/version +1 -1
- package/node_modules/node-html-parser/CHANGELOG.md +30 -0
- package/node_modules/node-html-parser/README.md +50 -11
- package/node_modules/node-html-parser/dist/index.js +8 -9
- package/node_modules/node-html-parser/dist/main.js +147 -53
- package/node_modules/node-html-parser/dist/matcher.js +26 -26
- package/node_modules/node-html-parser/dist/nodes/comment.js +22 -46
- package/node_modules/node-html-parser/dist/nodes/html.d.ts +33 -13
- package/node_modules/node-html-parser/dist/nodes/html.js +561 -653
- package/node_modules/node-html-parser/dist/nodes/node.js +18 -29
- package/node_modules/node-html-parser/dist/nodes/text.js +61 -100
- package/node_modules/node-html-parser/dist/valid.js +3 -4
- package/node_modules/node-html-parser/dist/void-tag.js +13 -15
- package/node_modules/node-html-parser/package.json +2 -1
- package/package.json +19 -19
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# NOTE: initially from https://www.npmjs.com/package/daddy-claude?activeTab=code
|
|
4
|
+
# Colors
|
|
5
|
+
RED='\033[0;31m'
|
|
6
|
+
GREEN='\033[0;32m'
|
|
7
|
+
NC='\033[0m'
|
|
8
|
+
|
|
9
|
+
# Find the most recently modified source file (exclude cache files and generated files)
|
|
10
|
+
files=$(find . -type f -mmin -1 \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" \) -not -path "*/node_modules/*" -not -path "*/.git/*" -not -path "*/lib/*" -not -path "*/dist/*" -not -path "*/coverage/*" -not -path "*/test-reports/*" -printf '%T@ %p\n' 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
|
|
11
|
+
if [[ -z $files ]]; then
|
|
12
|
+
exit 2
|
|
13
|
+
fi
|
|
14
|
+
|
|
15
|
+
# Check if qlty is available and initialized
|
|
16
|
+
qlty_available=false
|
|
17
|
+
if command -v qlty >/dev/null 2>&1 && [[ -d ".qlty" ]]; then
|
|
18
|
+
qlty_available=true
|
|
19
|
+
fi
|
|
20
|
+
|
|
21
|
+
# Auto-format TypeScript/JavaScript files with eslint --fix first
|
|
22
|
+
eslint_format_applied=false
|
|
23
|
+
if [[ $files == *.ts ]] || [[ $files == *.tsx ]] || [[ $files == *.js ]] || [[ $files == *.jsx ]]; then
|
|
24
|
+
# Try projen eslint first if available
|
|
25
|
+
if command -v npx >/dev/null 2>&1 && [[ -f "package.json" ]] && grep -q "projen" package.json; then
|
|
26
|
+
eslint_fix_output=$(npx projen eslint --fix "$files" 2>&1)
|
|
27
|
+
if [[ $eslint_fix_output == *"fixed"* ]] || [[ $eslint_fix_output == *"formatted"* ]]; then
|
|
28
|
+
eslint_format_applied=true
|
|
29
|
+
fi
|
|
30
|
+
elif command -v eslint >/dev/null 2>&1; then
|
|
31
|
+
# Fallback to direct eslint
|
|
32
|
+
eslint_fix_output=$(eslint --fix "$files" 2>&1)
|
|
33
|
+
if [[ $eslint_fix_output == *"fixed"* ]] || [[ $eslint_fix_output == *"formatted"* ]]; then
|
|
34
|
+
eslint_format_applied=true
|
|
35
|
+
fi
|
|
36
|
+
fi
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
# Run qlty checks (only if available)
|
|
40
|
+
fmt_output=""
|
|
41
|
+
check_output=""
|
|
42
|
+
check_exit_code=0
|
|
43
|
+
if [[ $qlty_available == true ]]; then
|
|
44
|
+
fmt_output=$(qlty fmt "$files" 2>&1)
|
|
45
|
+
check_output=$(qlty check --fix $files 2>&1)
|
|
46
|
+
check_exit_code=$?
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
# Run additional TypeScript/JavaScript tools
|
|
50
|
+
eslint_output=""
|
|
51
|
+
tsc_output=""
|
|
52
|
+
awslint_output=""
|
|
53
|
+
eslint_exit_code=0
|
|
54
|
+
tsc_exit_code=0
|
|
55
|
+
awslint_exit_code=0
|
|
56
|
+
|
|
57
|
+
if [[ $files == *.ts ]] || [[ $files == *.tsx ]] || [[ $files == *.js ]] || [[ $files == *.jsx ]]; then
|
|
58
|
+
# Run eslint (linting check without fix)
|
|
59
|
+
if command -v npx >/dev/null 2>&1 && [[ -f "package.json" ]] && grep -q "projen" package.json; then
|
|
60
|
+
eslint_output=$(npx projen eslint "$files" 2>&1)
|
|
61
|
+
eslint_exit_code=$?
|
|
62
|
+
elif command -v eslint >/dev/null 2>&1; then
|
|
63
|
+
eslint_output=$(eslint "$files" 2>&1)
|
|
64
|
+
eslint_exit_code=$?
|
|
65
|
+
fi
|
|
66
|
+
|
|
67
|
+
# Run TypeScript compiler check for .ts/.tsx files
|
|
68
|
+
if [[ $files == *.ts ]] || [[ $files == *.tsx ]]; then
|
|
69
|
+
if command -v tsc >/dev/null 2>&1; then
|
|
70
|
+
tsc_output=$(tsc --noEmit --skipLibCheck 2>&1)
|
|
71
|
+
tsc_exit_code=$?
|
|
72
|
+
fi
|
|
73
|
+
fi
|
|
74
|
+
|
|
75
|
+
# Run awslint for CDK projects (check if this is a CDK project)
|
|
76
|
+
if [[ -f "package.json" ]] && grep -q "aws-cdk" package.json; then
|
|
77
|
+
if command -v awslint >/dev/null 2>&1; then
|
|
78
|
+
awslint_output=$(awslint 2>&1)
|
|
79
|
+
awslint_exit_code=$?
|
|
80
|
+
elif command -v npx >/dev/null 2>&1; then
|
|
81
|
+
awslint_output=$(npm run awslint 2>&1)
|
|
82
|
+
awslint_exit_code=$?
|
|
83
|
+
fi
|
|
84
|
+
fi
|
|
85
|
+
fi
|
|
86
|
+
|
|
87
|
+
# Check for issues
|
|
88
|
+
has_issues=false
|
|
89
|
+
|
|
90
|
+
# Check if formatting happened (this is auto-fixed, so don't count as issue)
|
|
91
|
+
formatting_applied=false
|
|
92
|
+
if [[ $fmt_output == *"Formatted"* ]]; then
|
|
93
|
+
formatting_applied=true
|
|
94
|
+
fi
|
|
95
|
+
|
|
96
|
+
# Check if linting found issues
|
|
97
|
+
if [[ $qlty_available == true ]]; then
|
|
98
|
+
if [[ $check_output != *"No issues"* ]] || [[ $check_exit_code -ne 0 ]]; then
|
|
99
|
+
has_issues=true
|
|
100
|
+
fi
|
|
101
|
+
fi
|
|
102
|
+
|
|
103
|
+
# Check TypeScript/JavaScript tool issues
|
|
104
|
+
if [[ $eslint_exit_code -ne 0 ]] || [[ $tsc_exit_code -ne 0 ]] || [[ $awslint_exit_code -ne 0 ]]; then
|
|
105
|
+
has_issues=true
|
|
106
|
+
fi
|
|
107
|
+
|
|
108
|
+
# Remove test logic - now using real qlty detection
|
|
109
|
+
|
|
110
|
+
# Display results
|
|
111
|
+
if [[ $has_issues == true ]]; then
|
|
112
|
+
echo -e "${RED}🛑 STOP - Issues found in: $files${NC}" >&2
|
|
113
|
+
echo -e "${RED}The following MUST BE FIXED:${NC}" >&2
|
|
114
|
+
echo "" >&2
|
|
115
|
+
|
|
116
|
+
if [[ $qlty_available == true ]] && [[ $check_output != *"No issues"* ]]; then
|
|
117
|
+
# Extract remaining issue lines (skip headers/footers)
|
|
118
|
+
issue_lines=$(echo "$check_output" | grep -E "^\s*[0-9]+:[0-9]+\s+|high\s+|medium\s+|low\s+" | head -3)
|
|
119
|
+
remaining_issues=$(echo "$check_output" | grep -c "high\|medium\|low" 2>/dev/null || echo "0")
|
|
120
|
+
|
|
121
|
+
# Ensure remaining_issues is a valid number
|
|
122
|
+
if ! [[ $remaining_issues =~ ^[0-9]+$ ]]; then
|
|
123
|
+
remaining_issues=0
|
|
124
|
+
fi
|
|
125
|
+
|
|
126
|
+
# Simple, clear output
|
|
127
|
+
echo "🔍 QLTY Issues: ($remaining_issues remaining)" >&2
|
|
128
|
+
|
|
129
|
+
if [[ -n $issue_lines ]]; then
|
|
130
|
+
echo "$issue_lines" >&2
|
|
131
|
+
if [[ $remaining_issues -gt 3 ]]; then
|
|
132
|
+
echo "... and $((remaining_issues - 3)) more issues" >&2
|
|
133
|
+
fi
|
|
134
|
+
else
|
|
135
|
+
# Fallback: show first few lines if parsing failed
|
|
136
|
+
echo "$check_output" | head -5 >&2
|
|
137
|
+
fi
|
|
138
|
+
echo "" >&2
|
|
139
|
+
fi
|
|
140
|
+
|
|
141
|
+
# Show eslint issues
|
|
142
|
+
if [[ $eslint_exit_code -ne 0 ]] && [[ -n $eslint_output ]]; then
|
|
143
|
+
echo "🔍 ESLint Issues:" >&2
|
|
144
|
+
echo "$eslint_output" | head -5 >&2
|
|
145
|
+
echo "" >&2
|
|
146
|
+
fi
|
|
147
|
+
|
|
148
|
+
# Show TypeScript issues
|
|
149
|
+
if [[ $tsc_exit_code -ne 0 ]] && [[ -n $tsc_output ]]; then
|
|
150
|
+
echo "🔍 TypeScript Issues:" >&2
|
|
151
|
+
echo "$tsc_output" | grep -E "error|warning" | head -5 >&2
|
|
152
|
+
echo "" >&2
|
|
153
|
+
fi
|
|
154
|
+
|
|
155
|
+
# Show awslint issues
|
|
156
|
+
if [[ $awslint_exit_code -ne 0 ]] && [[ -n $awslint_output ]]; then
|
|
157
|
+
echo "🔍 AWS CDK Lint Issues:" >&2
|
|
158
|
+
echo "$awslint_output" | grep -E "error|warning" | head -5 >&2
|
|
159
|
+
echo "" >&2
|
|
160
|
+
fi
|
|
161
|
+
|
|
162
|
+
echo -e "${RED}Fix all issues above before continuing${NC}" >&2
|
|
163
|
+
exit 1
|
|
164
|
+
else
|
|
165
|
+
if [[ $eslint_format_applied == true ]] && [[ $formatting_applied == true ]]; then
|
|
166
|
+
echo -e "${GREEN}✅ ESLint + QLTY formatted $files. Code quality good. Continue${NC}" >&2
|
|
167
|
+
elif [[ $eslint_format_applied == true ]]; then
|
|
168
|
+
echo -e "${GREEN}✅ ESLint formatted $files. Code quality good. Continue${NC}" >&2
|
|
169
|
+
elif [[ $formatting_applied == true ]]; then
|
|
170
|
+
echo -e "${GREEN}✅ QLTY formatted $files. Code quality good. Continue${NC}" >&2
|
|
171
|
+
else
|
|
172
|
+
echo -e "${GREEN}✅ Code quality good for $files. Continue${NC}" >&2
|
|
173
|
+
fi
|
|
174
|
+
exit 2
|
|
175
|
+
fi
|
package/.jsii
CHANGED
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
]
|
|
9
9
|
},
|
|
10
10
|
"bundled": {
|
|
11
|
-
"node-html-parser": "^
|
|
11
|
+
"node-html-parser": "^7.0.1"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@mavogel/mvc-projen": "^0.0.
|
|
15
|
-
"aws-cdk-lib": "^2.
|
|
14
|
+
"@mavogel/mvc-projen": "^0.0.7",
|
|
15
|
+
"aws-cdk-lib": "^2.190.0",
|
|
16
16
|
"cdk-nag": "^2.35.0",
|
|
17
17
|
"constructs": "^10.0.5"
|
|
18
18
|
},
|
|
@@ -43,32 +43,6 @@
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
|
-
"@aws-cdk/asset-kubectl-v20": {
|
|
47
|
-
"targets": {
|
|
48
|
-
"dotnet": {
|
|
49
|
-
"namespace": "Amazon.CDK.Asset.KubectlV20",
|
|
50
|
-
"packageId": "Amazon.CDK.Asset.KubectlV20"
|
|
51
|
-
},
|
|
52
|
-
"go": {
|
|
53
|
-
"moduleName": "github.com/cdklabs/awscdk-asset-kubectl-go",
|
|
54
|
-
"packageName": "kubectlv20"
|
|
55
|
-
},
|
|
56
|
-
"java": {
|
|
57
|
-
"maven": {
|
|
58
|
-
"artifactId": "cdk-asset-kubectl-v20",
|
|
59
|
-
"groupId": "software.amazon.awscdk"
|
|
60
|
-
},
|
|
61
|
-
"package": "software.amazon.awscdk.cdk.asset.kubectl.v20"
|
|
62
|
-
},
|
|
63
|
-
"js": {
|
|
64
|
-
"npm": "@aws-cdk/asset-kubectl-v20"
|
|
65
|
-
},
|
|
66
|
-
"python": {
|
|
67
|
-
"distName": "aws-cdk.asset-kubectl-v20",
|
|
68
|
-
"module": "aws_cdk.asset_kubectl_v20"
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
46
|
"@aws-cdk/asset-node-proxy-agent-v6": {
|
|
73
47
|
"targets": {
|
|
74
48
|
"dotnet": {
|
|
@@ -987,6 +961,19 @@
|
|
|
987
961
|
}
|
|
988
962
|
}
|
|
989
963
|
},
|
|
964
|
+
"aws-cdk-lib.aws_cognito_identitypool": {
|
|
965
|
+
"targets": {
|
|
966
|
+
"dotnet": {
|
|
967
|
+
"namespace": "Amazon.CDK.AWS.Cognito.Identitypool"
|
|
968
|
+
},
|
|
969
|
+
"java": {
|
|
970
|
+
"package": "software.amazon.awscdk.services.cognito.identitypool"
|
|
971
|
+
},
|
|
972
|
+
"python": {
|
|
973
|
+
"module": "aws_cdk.aws_cognito_identitypool"
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
},
|
|
990
977
|
"aws-cdk-lib.aws_comprehend": {
|
|
991
978
|
"targets": {
|
|
992
979
|
"dotnet": {
|
|
@@ -1273,6 +1260,19 @@
|
|
|
1273
1260
|
}
|
|
1274
1261
|
}
|
|
1275
1262
|
},
|
|
1263
|
+
"aws-cdk-lib.aws_dsql": {
|
|
1264
|
+
"targets": {
|
|
1265
|
+
"dotnet": {
|
|
1266
|
+
"package": "Amazon.CDK.AWS.DSQL"
|
|
1267
|
+
},
|
|
1268
|
+
"java": {
|
|
1269
|
+
"package": "software.amazon.awscdk.services.dsql"
|
|
1270
|
+
},
|
|
1271
|
+
"python": {
|
|
1272
|
+
"module": "aws_cdk.aws_dsql"
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
},
|
|
1276
1276
|
"aws-cdk-lib.aws_dynamodb": {
|
|
1277
1277
|
"targets": {
|
|
1278
1278
|
"dotnet": {
|
|
@@ -1663,6 +1663,19 @@
|
|
|
1663
1663
|
}
|
|
1664
1664
|
}
|
|
1665
1665
|
},
|
|
1666
|
+
"aws-cdk-lib.aws_gameliftstreams": {
|
|
1667
|
+
"targets": {
|
|
1668
|
+
"dotnet": {
|
|
1669
|
+
"package": "Amazon.CDK.AWS.GameLiftStreams"
|
|
1670
|
+
},
|
|
1671
|
+
"java": {
|
|
1672
|
+
"package": "software.amazon.awscdk.services.gameliftstreams"
|
|
1673
|
+
},
|
|
1674
|
+
"python": {
|
|
1675
|
+
"module": "aws_cdk.aws_gameliftstreams"
|
|
1676
|
+
}
|
|
1677
|
+
}
|
|
1678
|
+
},
|
|
1666
1679
|
"aws-cdk-lib.aws_globalaccelerator": {
|
|
1667
1680
|
"targets": {
|
|
1668
1681
|
"dotnet": {
|
|
@@ -3288,6 +3301,19 @@
|
|
|
3288
3301
|
}
|
|
3289
3302
|
}
|
|
3290
3303
|
},
|
|
3304
|
+
"aws-cdk-lib.aws_scheduler_targets": {
|
|
3305
|
+
"targets": {
|
|
3306
|
+
"dotnet": {
|
|
3307
|
+
"namespace": "Amazon.CDK.AWS.Scheduler.Targets"
|
|
3308
|
+
},
|
|
3309
|
+
"java": {
|
|
3310
|
+
"package": "software.amazon.awscdk.services.scheduler.targets"
|
|
3311
|
+
},
|
|
3312
|
+
"python": {
|
|
3313
|
+
"module": "aws_cdk.aws_scheduler_targets"
|
|
3314
|
+
}
|
|
3315
|
+
}
|
|
3316
|
+
},
|
|
3291
3317
|
"aws-cdk-lib.aws_sdb": {
|
|
3292
3318
|
"targets": {
|
|
3293
3319
|
"dotnet": {
|
|
@@ -3835,19 +3861,6 @@
|
|
|
3835
3861
|
}
|
|
3836
3862
|
}
|
|
3837
3863
|
},
|
|
3838
|
-
"aws-cdk-lib.lambda_layer_kubectl": {
|
|
3839
|
-
"targets": {
|
|
3840
|
-
"dotnet": {
|
|
3841
|
-
"namespace": "Amazon.CDK.LambdaLayer.Kubectl"
|
|
3842
|
-
},
|
|
3843
|
-
"java": {
|
|
3844
|
-
"package": "software.amazon.awscdk.lambdalayer.kubectl"
|
|
3845
|
-
},
|
|
3846
|
-
"python": {
|
|
3847
|
-
"module": "aws_cdk.lambda_layer_kubectl"
|
|
3848
|
-
}
|
|
3849
|
-
}
|
|
3850
|
-
},
|
|
3851
3864
|
"aws-cdk-lib.lambda_layer_node_proxy_agent": {
|
|
3852
3865
|
"targets": {
|
|
3853
3866
|
"dotnet": {
|
|
@@ -4069,7 +4082,7 @@
|
|
|
4069
4082
|
"stability": "experimental"
|
|
4070
4083
|
},
|
|
4071
4084
|
"homepage": "https://github.com/MV-Consulting/cdk-vscode-server.git",
|
|
4072
|
-
"jsiiVersion": "5.7.
|
|
4085
|
+
"jsiiVersion": "5.7.22 (build 1cfeabd)",
|
|
4073
4086
|
"keywords": [
|
|
4074
4087
|
"aws",
|
|
4075
4088
|
"cdk",
|
|
@@ -4518,6 +4531,6 @@
|
|
|
4518
4531
|
"symbolId": "src/vscode-server:VSCodeServerProps"
|
|
4519
4532
|
}
|
|
4520
4533
|
},
|
|
4521
|
-
"version": "0.0.
|
|
4522
|
-
"fingerprint": "
|
|
4534
|
+
"version": "0.0.50",
|
|
4535
|
+
"fingerprint": "CnwXpjGffN3iG8x0oGcQKQh4kyWz+S2JsAQ2lhNXh0U="
|
|
4523
4536
|
}
|
package/.qlty/.gitignore
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
extends: default
|
|
2
|
+
|
|
3
|
+
rules:
|
|
4
|
+
document-start: disable
|
|
5
|
+
quoted-strings:
|
|
6
|
+
required: only-when-needed
|
|
7
|
+
extra-allowed: ["{|}"]
|
|
8
|
+
key-duplicates: {}
|
|
9
|
+
octal-values:
|
|
10
|
+
forbid-implicit-octal: true
|
|
11
|
+
line-length: disable
|
|
12
|
+
indentation: disable
|
|
13
|
+
new-line-at-end-of-file: disable
|
|
14
|
+
trailing-spaces: disable
|
|
15
|
+
brackets: disable
|
|
16
|
+
colons: disable
|
|
17
|
+
empty-lines: disable
|
|
18
|
+
comments: disable
|
|
19
|
+
braces: disable
|
|
20
|
+
comments-indentation: disable
|
|
21
|
+
commas: disable
|
package/.qlty/qlty.toml
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# This file was automatically generated by `qlty init`.
|
|
2
|
+
# You can modify it to suit your needs.
|
|
3
|
+
# We recommend you to commit this file to your repository.
|
|
4
|
+
#
|
|
5
|
+
# This configuration is used by both Qlty CLI and Qlty Cloud.
|
|
6
|
+
#
|
|
7
|
+
# Qlty CLI -- Code quality toolkit for developers
|
|
8
|
+
# Qlty Cloud -- Fully automated Code Health Platform
|
|
9
|
+
#
|
|
10
|
+
# Try Qlty Cloud: https://qlty.sh
|
|
11
|
+
#
|
|
12
|
+
# For a guide to configuration, visit https://qlty.sh/d/config
|
|
13
|
+
# Or for a full reference, visit https://qlty.sh/d/qlty-toml
|
|
14
|
+
config_version = "0"
|
|
15
|
+
|
|
16
|
+
exclude_patterns = [
|
|
17
|
+
"*_min.*",
|
|
18
|
+
"*-min.*",
|
|
19
|
+
"*.min.*",
|
|
20
|
+
"**/.yarn/**",
|
|
21
|
+
"**/*.d.ts",
|
|
22
|
+
"**/assets/**",
|
|
23
|
+
"**/bower_components/**",
|
|
24
|
+
"**/build/**",
|
|
25
|
+
"**/cache/**",
|
|
26
|
+
"**/config/**",
|
|
27
|
+
"**/db/**",
|
|
28
|
+
"**/deps/**",
|
|
29
|
+
"**/dist/**",
|
|
30
|
+
"**/extern/**",
|
|
31
|
+
"**/external/**",
|
|
32
|
+
"**/generated/**",
|
|
33
|
+
"**/Godeps/**",
|
|
34
|
+
"**/gradlew/**",
|
|
35
|
+
"**/mvnw/**",
|
|
36
|
+
"**/node_modules/**",
|
|
37
|
+
"**/protos/**",
|
|
38
|
+
"**/seed/**",
|
|
39
|
+
"**/target/**",
|
|
40
|
+
"**/templates/**",
|
|
41
|
+
"**/testdata/**",
|
|
42
|
+
"**/vendor/**",
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
test_patterns = [
|
|
46
|
+
"**/test/**",
|
|
47
|
+
"**/spec/**",
|
|
48
|
+
"**/*.test.*",
|
|
49
|
+
"**/*.spec.*",
|
|
50
|
+
"**/*_test.*",
|
|
51
|
+
"**/*_spec.*",
|
|
52
|
+
"**/test_*.*",
|
|
53
|
+
"**/spec_*.*",
|
|
54
|
+
]
|
|
55
|
+
|
|
56
|
+
[smells]
|
|
57
|
+
mode = "comment"
|
|
58
|
+
|
|
59
|
+
[[source]]
|
|
60
|
+
name = "default"
|
|
61
|
+
default = true
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
[[plugin]]
|
|
65
|
+
name = "actionlint"
|
|
66
|
+
|
|
67
|
+
[[plugin]]
|
|
68
|
+
name = "checkov"
|
|
69
|
+
|
|
70
|
+
[[plugin]]
|
|
71
|
+
name = "eslint"
|
|
72
|
+
version = "9.33.0"
|
|
73
|
+
package_file = "package.json"
|
|
74
|
+
package_filters = ["eslint", "jest"]
|
|
75
|
+
|
|
76
|
+
[[plugin]]
|
|
77
|
+
name = "gofmt"
|
|
78
|
+
|
|
79
|
+
[[plugin]]
|
|
80
|
+
name = "golangci-lint"
|
|
81
|
+
mode = "comment"
|
|
82
|
+
|
|
83
|
+
[[plugin]]
|
|
84
|
+
name = "markdownlint"
|
|
85
|
+
mode = "comment"
|
|
86
|
+
|
|
87
|
+
[[plugin]]
|
|
88
|
+
name = "osv-scanner"
|
|
89
|
+
|
|
90
|
+
[[plugin]]
|
|
91
|
+
name = "prettier"
|
|
92
|
+
|
|
93
|
+
[[plugin]]
|
|
94
|
+
name = "radarlint-go"
|
|
95
|
+
mode = "monitor"
|
|
96
|
+
|
|
97
|
+
[[plugin]]
|
|
98
|
+
name = "radarlint-js"
|
|
99
|
+
|
|
100
|
+
[[plugin]]
|
|
101
|
+
name = "ripgrep"
|
|
102
|
+
mode = "comment"
|
|
103
|
+
|
|
104
|
+
[[plugin]]
|
|
105
|
+
name = "trivy"
|
|
106
|
+
drivers = [
|
|
107
|
+
"config",
|
|
108
|
+
"fs-vuln",
|
|
109
|
+
]
|
|
110
|
+
|
|
111
|
+
[[plugin]]
|
|
112
|
+
name = "trufflehog"
|
|
113
|
+
|
|
114
|
+
[[plugin]]
|
|
115
|
+
name = "yamllint"
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## Repository Overview
|
|
6
|
+
|
|
7
|
+
This is a CDK construct library for deploying VS Code Server on AWS, designed for development and workshop purposes. The project creates a complete infrastructure setup that allows users to run a cloud-based VS Code instance accessible through CloudFront.
|
|
8
|
+
|
|
9
|
+
## Development Commands
|
|
10
|
+
|
|
11
|
+
### Build and Test
|
|
12
|
+
```bash
|
|
13
|
+
# Build the project (TypeScript compilation, bundling, etc.)
|
|
14
|
+
npx projen build
|
|
15
|
+
|
|
16
|
+
# Run tests
|
|
17
|
+
npx projen test
|
|
18
|
+
|
|
19
|
+
# Run tests in watch mode
|
|
20
|
+
npx projen test:watch
|
|
21
|
+
|
|
22
|
+
# Run a single test file
|
|
23
|
+
npx jest test/vscode-server.test.ts
|
|
24
|
+
|
|
25
|
+
# Run integration tests (deploys to AWS)
|
|
26
|
+
npm run integ-test
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Code Quality
|
|
30
|
+
```bash
|
|
31
|
+
# Run ESLint
|
|
32
|
+
npx projen eslint
|
|
33
|
+
|
|
34
|
+
# AWS CDK linting
|
|
35
|
+
npm run awslint
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Package Management
|
|
39
|
+
```bash
|
|
40
|
+
# Install dependencies and update projen
|
|
41
|
+
npx projen
|
|
42
|
+
|
|
43
|
+
# Build and package for all targets (JS, Python, Go)
|
|
44
|
+
npx projen package-all
|
|
45
|
+
|
|
46
|
+
# Package for specific target
|
|
47
|
+
npx projen package:js
|
|
48
|
+
npx projen package:python
|
|
49
|
+
npx projen package:go
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Lambda Functions
|
|
53
|
+
```bash
|
|
54
|
+
# Bundle installer Lambda
|
|
55
|
+
npx projen bundle:installer/installer.lambda
|
|
56
|
+
|
|
57
|
+
# Bundle secret retriever Lambda
|
|
58
|
+
npx projen bundle:secret-retriever/secret-retriever.lambda
|
|
59
|
+
|
|
60
|
+
# Watch mode for development
|
|
61
|
+
npx projen bundle:installer/installer.lambda:watch
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Architecture Overview
|
|
65
|
+
|
|
66
|
+
### Core Components
|
|
67
|
+
|
|
68
|
+
**Main Construct (`src/vscode-server.ts`)**:
|
|
69
|
+
- `VSCodeServer` - Primary construct that orchestrates the entire solution
|
|
70
|
+
- Creates VPC, EC2 instance, CloudFront distribution, security groups
|
|
71
|
+
- Supports Ubuntu 22/24 and Amazon Linux 2023
|
|
72
|
+
- Configurable instance types, storage, and additional permissions
|
|
73
|
+
|
|
74
|
+
**Infrastructure Components**:
|
|
75
|
+
- **VPC**: Single AZ public subnet configuration
|
|
76
|
+
- **EC2 Instance**: Configurable instance with pre-installed development tools
|
|
77
|
+
- **CloudFront**: Distribution for secure access with cache policies
|
|
78
|
+
- **Security Groups**: Restricted to CloudFront prefix lists only
|
|
79
|
+
- **IAM**: Comprehensive role for CDK operations and AWS service access
|
|
80
|
+
|
|
81
|
+
**Lambda Functions** (`src/installer/`, `src/secret-retriever/`):
|
|
82
|
+
- **Installer**: Custom resource for OS-specific VS Code server installation
|
|
83
|
+
- **Secret Retriever**: Custom resource for extracting generated passwords
|
|
84
|
+
|
|
85
|
+
**Utility Modules**:
|
|
86
|
+
- `src/mappings.ts` - AMI mappings for different OS/architecture combinations
|
|
87
|
+
- `src/prefixlist-retriever/` - AWS managed prefix list retrieval
|
|
88
|
+
- `src/suppress-nags.ts` - CDK-nag suppression patterns
|
|
89
|
+
|
|
90
|
+
### Supported Configurations
|
|
91
|
+
|
|
92
|
+
**Operating Systems**:
|
|
93
|
+
- Ubuntu 22.04 LTS (`LinuxFlavorType.UBUNTU_22`)
|
|
94
|
+
- Ubuntu 24.04 LTS (`LinuxFlavorType.UBUNTU_24`)
|
|
95
|
+
- Amazon Linux 2023 (`LinuxFlavorType.AMAZON_LINUX_2023`)
|
|
96
|
+
|
|
97
|
+
**Architectures**:
|
|
98
|
+
- ARM64 (`LinuxArchitectureType.ARM`)
|
|
99
|
+
- x86_64 (`LinuxArchitectureType.AMD64`)
|
|
100
|
+
|
|
101
|
+
**Default Instance**: m7g.xlarge (ARM-based Graviton3)
|
|
102
|
+
|
|
103
|
+
## Project Structure
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
src/
|
|
107
|
+
├── index.ts # Main export
|
|
108
|
+
├── vscode-server.ts # Core VSCodeServer construct
|
|
109
|
+
├── mappings.ts # AMI mappings
|
|
110
|
+
├── installer/ # Installation Lambda functions
|
|
111
|
+
├── secret-retriever/ # Password generation utilities
|
|
112
|
+
└── prefixlist-retriever/ # AWS prefix list utilities
|
|
113
|
+
|
|
114
|
+
test/
|
|
115
|
+
├── vscode-server.test.ts # Unit tests
|
|
116
|
+
└── installer/ # Lambda function tests
|
|
117
|
+
|
|
118
|
+
integ-tests/
|
|
119
|
+
├── integ.ubuntu.ts # Ubuntu integration tests
|
|
120
|
+
└── integ.al2023.ts # Amazon Linux integration tests
|
|
121
|
+
|
|
122
|
+
examples/
|
|
123
|
+
├── simple/ # Basic usage example
|
|
124
|
+
└── custom/ # Advanced configuration example
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Key Properties and Customization
|
|
128
|
+
|
|
129
|
+
The `VSCodeServerProps` interface allows extensive customization:
|
|
130
|
+
|
|
131
|
+
- **Instance Configuration**: `instanceClass`, `instanceSize`, `instanceVolumeSize`
|
|
132
|
+
- **Operating System**: `instanceOperatingSystem`, `instanceCpuArchitecture`
|
|
133
|
+
- **VS Code Settings**: `vscodeUser`, `vscodePassword`, `homeFolder`
|
|
134
|
+
- **Development Server**: `devServerBasePath`, `devServerPort`
|
|
135
|
+
- **Extensions**: `additionalInstanceRolePolicies`, `additionalTags`
|
|
136
|
+
|
|
137
|
+
## Important Development Notes
|
|
138
|
+
|
|
139
|
+
- This is a **Projen-managed project** - all configuration changes should be made in `.projenrc.ts` (not found in current structure, likely generated)
|
|
140
|
+
- The project uses **JSII** for multi-language support (TypeScript, Python, Go)
|
|
141
|
+
- **CDK-nag** is integrated for security compliance checking
|
|
142
|
+
- Integration tests deploy real AWS resources and require valid AWS credentials
|
|
143
|
+
- Lambda functions are bundled using esbuild for optimal performance
|
|
144
|
+
- CloudFront distribution includes custom cache policies for VS Code Server compatibility
|
|
145
|
+
|
|
146
|
+
## Security Considerations
|
|
147
|
+
|
|
148
|
+
- Security groups restrict access to CloudFront IPs only
|
|
149
|
+
- Instance role includes broad permissions for workshop scenarios (not production-ready)
|
|
150
|
+
- Secrets Manager integration for password generation
|
|
151
|
+
- EBS encryption enabled by default
|
|
152
|
+
- IMDSv2 required on EC2 instances
|
|
153
|
+
|
|
154
|
+
## Testing Strategy
|
|
155
|
+
|
|
156
|
+
- **Unit Tests**: Mock-based testing of construct logic
|
|
157
|
+
- **Integration Tests**: Full deployment testing in multiple regions (eu-west-1, eu-west-2)
|
|
158
|
+
- **Coverage Reports**: Generated in `coverage/` directory with multiple formats
|
|
159
|
+
- **Jest Configuration**: Includes JUnit reporter for CI/CD integration
|
package/lib/vscode-server.js
CHANGED
|
@@ -442,7 +442,7 @@ class VSCodeServer extends constructs_1.Construct {
|
|
|
442
442
|
}
|
|
443
443
|
exports.VSCodeServer = VSCodeServer;
|
|
444
444
|
_a = JSII_RTTI_SYMBOL_1;
|
|
445
|
-
VSCodeServer[_a] = { fqn: "@mavogel/cdk-vscode-server.VSCodeServer", version: "0.0.
|
|
445
|
+
VSCodeServer[_a] = { fqn: "@mavogel/cdk-vscode-server.VSCodeServer", version: "0.0.50" };
|
|
446
446
|
/**
|
|
447
447
|
* Tags all the resources in the construct
|
|
448
448
|
*/
|
|
@@ -4,13 +4,12 @@ go 1.23
|
|
|
4
4
|
|
|
5
5
|
require (
|
|
6
6
|
github.com/aws/jsii-runtime-go v1.113.0
|
|
7
|
-
github.com/MV-Consulting/mvc-projen/mavogelmvcprojen v0.0.
|
|
8
|
-
github.com/aws/aws-cdk-go/awscdk/v2 v2.
|
|
9
|
-
github.com/cdklabs/cdk-nag-go/cdknag/v2 v2.
|
|
7
|
+
github.com/MV-Consulting/mvc-projen/mavogelmvcprojen v0.0.7
|
|
8
|
+
github.com/aws/aws-cdk-go/awscdk/v2 v2.190.0
|
|
9
|
+
github.com/cdklabs/cdk-nag-go/cdknag/v2 v2.37.3
|
|
10
10
|
github.com/aws/constructs-go/constructs/v10 v10.4.2
|
|
11
11
|
github.com/projen/projen-go/projen v0.91.8 // indirect
|
|
12
|
-
github.com/cdklabs/awscdk-asset-awscli-go/awscliv1/v2 v2.2.
|
|
13
|
-
github.com/cdklabs/awscdk-asset-kubectl-go/kubectlv20/v2 v2.1.3 // indirect
|
|
12
|
+
github.com/cdklabs/awscdk-asset-awscli-go/awscliv1/v2 v2.2.242 // indirect
|
|
14
13
|
github.com/cdklabs/awscdk-asset-node-proxy-agent-go/nodeproxyagentv6/v2 v2.1.0 // indirect
|
|
15
|
-
github.com/cdklabs/cloud-assembly-schema-go/awscdkcloudassemblyschema/
|
|
14
|
+
github.com/cdklabs/cloud-assembly-schema-go/awscdkcloudassemblyschema/v41 v41.2.0 // indirect
|
|
16
15
|
)
|
|
@@ -15,7 +15,7 @@ import (
|
|
|
15
15
|
mavogelmvcprojen "github.com/MV-Consulting/mvc-projen/mavogelmvcprojen/jsii"
|
|
16
16
|
)
|
|
17
17
|
|
|
18
|
-
//go:embed mavogel-cdk-vscode-server-0.0.
|
|
18
|
+
//go:embed mavogel-cdk-vscode-server-0.0.49.tgz
|
|
19
19
|
var tarball []byte
|
|
20
20
|
|
|
21
21
|
// Initialize loads the necessary packages in the @jsii/kernel to support the enclosing module.
|
|
@@ -28,5 +28,5 @@ func Initialize() {
|
|
|
28
28
|
constructs.Initialize()
|
|
29
29
|
|
|
30
30
|
// Load this library into the kernel
|
|
31
|
-
_jsii_.Load("@mavogel/cdk-vscode-server", "0.0.
|
|
31
|
+
_jsii_.Load("@mavogel/cdk-vscode-server", "0.0.49", tarball)
|
|
32
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.
|
|
1
|
+
0.0.49
|