@mavogel/cdk-vscode-server 0.0.17 → 0.0.19

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.
Files changed (55) hide show
  1. package/.jsii +45 -22
  2. package/API.md +14 -0
  3. package/CONTRIBUTING.md +6 -6
  4. package/README.md +1 -1
  5. package/integ-tests/integ.al2023.ts +4 -0
  6. package/integ-tests/integ.al2023.ts.snapshot/IntegSetupVSCodeOnAl2023DefaultTestDeployAssert74D8F645.assets.json +6 -6
  7. package/integ-tests/integ.al2023.ts.snapshot/IntegSetupVSCodeOnAl2023DefaultTestDeployAssert74D8F645.template.json +2 -2
  8. package/integ-tests/integ.al2023.ts.snapshot/IntegTestStackAl2023.assets.json +12 -12
  9. package/integ-tests/integ.al2023.ts.snapshot/IntegTestStackAl2023.template.json +307 -23
  10. package/integ-tests/integ.al2023.ts.snapshot/asset.7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200/__entrypoint__.js +1 -0
  11. package/integ-tests/integ.al2023.ts.snapshot/{asset.512cf155ada4793b37a885c1aa6d9bb8f534e88bac6f63c69672d4d73df2decf.lambda → asset.a9865c9d36c7aa999e28cb7926e7a3a8e0b6d0854b25131a172024c5777442fa.lambda}/index.js +28 -9
  12. package/integ-tests/integ.al2023.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/cfn-response.js +1 -0
  13. package/integ-tests/{integ.ubuntu.ts.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e → integ.al2023.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca}/outbound.js +1 -1
  14. package/integ-tests/integ.al2023.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/util.js +1 -0
  15. package/integ-tests/{integ.ubuntu.ts.snapshot/asset.c504585dae89ce8e394d7744ccae054318e7d1aff14afb545438d173d51dc97d.bundle → integ.al2023.ts.snapshot/asset.f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.bundle}/index.js +42 -43
  16. package/integ-tests/integ.al2023.ts.snapshot/cdk.out +1 -1
  17. package/integ-tests/integ.al2023.ts.snapshot/integ.json +2 -2
  18. package/integ-tests/integ.al2023.ts.snapshot/manifest.json +3 -5
  19. package/integ-tests/integ.al2023.ts.snapshot/tree.json +453 -169
  20. package/integ-tests/integ.ubuntu.ts.snapshot/IntegSetupVSCodeOnUbuntuDefaultTestDeployAssertFF8DF2C5.assets.json +6 -6
  21. package/integ-tests/integ.ubuntu.ts.snapshot/IntegSetupVSCodeOnUbuntuDefaultTestDeployAssertFF8DF2C5.template.json +2 -2
  22. package/integ-tests/integ.ubuntu.ts.snapshot/IntegTestStackUbuntu22.assets.json +12 -12
  23. package/integ-tests/integ.ubuntu.ts.snapshot/IntegTestStackUbuntu22.template.json +131 -23
  24. package/integ-tests/integ.ubuntu.ts.snapshot/asset.7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200/__entrypoint__.js +1 -0
  25. package/integ-tests/integ.ubuntu.ts.snapshot/{asset.512cf155ada4793b37a885c1aa6d9bb8f534e88bac6f63c69672d4d73df2decf.lambda → asset.a9865c9d36c7aa999e28cb7926e7a3a8e0b6d0854b25131a172024c5777442fa.lambda}/index.js +28 -9
  26. package/integ-tests/integ.ubuntu.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/cfn-response.js +1 -0
  27. package/integ-tests/{integ.al2023.ts.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e → integ.ubuntu.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca}/outbound.js +1 -1
  28. package/integ-tests/integ.ubuntu.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/util.js +1 -0
  29. package/integ-tests/{integ.al2023.ts.snapshot/asset.c504585dae89ce8e394d7744ccae054318e7d1aff14afb545438d173d51dc97d.bundle → integ.ubuntu.ts.snapshot/asset.f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.bundle}/index.js +42 -43
  30. package/integ-tests/integ.ubuntu.ts.snapshot/cdk.out +1 -1
  31. package/integ-tests/integ.ubuntu.ts.snapshot/integ.json +2 -2
  32. package/integ-tests/integ.ubuntu.ts.snapshot/manifest.json +3 -5
  33. package/integ-tests/integ.ubuntu.ts.snapshot/tree.json +277 -169
  34. package/lib/vscode-server.d.ts +8 -0
  35. package/lib/vscode-server.js +17 -2
  36. package/mavogelcdkvscodeserver/LinuxArchitectureType.go +2 -0
  37. package/mavogelcdkvscodeserver/LinuxFlavorType.go +3 -0
  38. package/mavogelcdkvscodeserver/README.md +1 -1
  39. package/mavogelcdkvscodeserver/VSCodeServer.go +3 -0
  40. package/mavogelcdkvscodeserver/VSCodeServerProps.go +5 -0
  41. package/mavogelcdkvscodeserver/jsii/jsii.go +2 -2
  42. package/mavogelcdkvscodeserver/version +1 -1
  43. package/package.json +1 -1
  44. package/integ-tests/integ.al2023.ts.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/cfn-response.js +0 -1
  45. package/integ-tests/integ.al2023.ts.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/util.js +0 -1
  46. package/integ-tests/integ.al2023.ts.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js +0 -1
  47. package/integ-tests/integ.ubuntu.ts.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/cfn-response.js +0 -1
  48. package/integ-tests/integ.ubuntu.ts.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/util.js +0 -1
  49. package/integ-tests/integ.ubuntu.ts.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js +0 -1
  50. /package/integ-tests/integ.al2023.ts.snapshot/{asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a → asset.7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200}/index.js +0 -0
  51. /package/integ-tests/integ.al2023.ts.snapshot/{asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e → asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca}/consts.js +0 -0
  52. /package/integ-tests/integ.al2023.ts.snapshot/{asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e → asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca}/framework.js +0 -0
  53. /package/integ-tests/integ.ubuntu.ts.snapshot/{asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a → asset.7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200}/index.js +0 -0
  54. /package/integ-tests/integ.ubuntu.ts.snapshot/{asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e → asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca}/consts.js +0 -0
  55. /package/integ-tests/integ.ubuntu.ts.snapshot/{asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e → asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca}/framework.js +0 -0
@@ -1,20 +1,20 @@
1
1
  {
2
- "version": "38.0.1",
2
+ "version": "39.0.0",
3
3
  "files": {
4
- "c504585dae89ce8e394d7744ccae054318e7d1aff14afb545438d173d51dc97d": {
4
+ "f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd": {
5
5
  "source": {
6
- "path": "asset.c504585dae89ce8e394d7744ccae054318e7d1aff14afb545438d173d51dc97d.bundle",
6
+ "path": "asset.f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.bundle",
7
7
  "packaging": "zip"
8
8
  },
9
9
  "destinations": {
10
10
  "current_account-current_region": {
11
11
  "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
12
- "objectKey": "c504585dae89ce8e394d7744ccae054318e7d1aff14afb545438d173d51dc97d.zip",
12
+ "objectKey": "f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.zip",
13
13
  "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
14
14
  }
15
15
  }
16
16
  },
17
- "8528989b349430013bc967b9e5c7f03697e2b3942eaba53a27734619a96c5b83": {
17
+ "a71f91710d4c2dfe81f76039abffc6472068e6ea5aefd8eced32d67804163a69": {
18
18
  "source": {
19
19
  "path": "IntegSetupVSCodeOnUbuntuDefaultTestDeployAssertFF8DF2C5.template.json",
20
20
  "packaging": "file"
@@ -22,7 +22,7 @@
22
22
  "destinations": {
23
23
  "current_account-current_region": {
24
24
  "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
25
- "objectKey": "8528989b349430013bc967b9e5c7f03697e2b3942eaba53a27734619a96c5b83.json",
25
+ "objectKey": "a71f91710d4c2dfe81f76039abffc6472068e6ea5aefd8eced32d67804163a69.json",
26
26
  "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
27
27
  }
28
28
  }
@@ -45,7 +45,7 @@
45
45
  }
46
46
  },
47
47
  "flattenResponse": "false",
48
- "salt": "1736842557530"
48
+ "salt": "1737895520726"
49
49
  },
50
50
  "UpdateReplacePolicy": "Delete",
51
51
  "DeletionPolicy": "Delete"
@@ -153,7 +153,7 @@
153
153
  "S3Bucket": {
154
154
  "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
155
155
  },
156
- "S3Key": "c504585dae89ce8e394d7744ccae054318e7d1aff14afb545438d173d51dc97d.zip"
156
+ "S3Key": "f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.zip"
157
157
  },
158
158
  "Timeout": 120,
159
159
  "Handler": "index.handler",
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "38.0.1",
2
+ "version": "39.0.0",
3
3
  "files": {
4
4
  "781ab0ab74634cdaf61539ab208ab777829ef07097ac21f95b9e15a3b1eedc1b": {
5
5
  "source": {
@@ -14,28 +14,28 @@
14
14
  }
15
15
  }
16
16
  },
17
- "4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e": {
17
+ "bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca": {
18
18
  "source": {
19
- "path": "asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e",
19
+ "path": "asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca",
20
20
  "packaging": "zip"
21
21
  },
22
22
  "destinations": {
23
23
  "current_account-current_region": {
24
24
  "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
25
- "objectKey": "4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e.zip",
25
+ "objectKey": "bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca.zip",
26
26
  "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
27
27
  }
28
28
  }
29
29
  },
30
- "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": {
30
+ "7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200": {
31
31
  "source": {
32
- "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a",
32
+ "path": "asset.7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200",
33
33
  "packaging": "zip"
34
34
  },
35
35
  "destinations": {
36
36
  "current_account-current_region": {
37
37
  "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
38
- "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip",
38
+ "objectKey": "7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200.zip",
39
39
  "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
40
40
  }
41
41
  }
@@ -53,15 +53,15 @@
53
53
  }
54
54
  }
55
55
  },
56
- "512cf155ada4793b37a885c1aa6d9bb8f534e88bac6f63c69672d4d73df2decf": {
56
+ "a9865c9d36c7aa999e28cb7926e7a3a8e0b6d0854b25131a172024c5777442fa": {
57
57
  "source": {
58
- "path": "asset.512cf155ada4793b37a885c1aa6d9bb8f534e88bac6f63c69672d4d73df2decf.lambda",
58
+ "path": "asset.a9865c9d36c7aa999e28cb7926e7a3a8e0b6d0854b25131a172024c5777442fa.lambda",
59
59
  "packaging": "zip"
60
60
  },
61
61
  "destinations": {
62
62
  "current_account-current_region": {
63
63
  "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
64
- "objectKey": "512cf155ada4793b37a885c1aa6d9bb8f534e88bac6f63c69672d4d73df2decf.zip",
64
+ "objectKey": "a9865c9d36c7aa999e28cb7926e7a3a8e0b6d0854b25131a172024c5777442fa.zip",
65
65
  "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
66
66
  }
67
67
  }
@@ -92,7 +92,7 @@
92
92
  }
93
93
  }
94
94
  },
95
- "ad8d8b125c235b50e9ac65a63f50cba22a3148b6b5a491832bba2d7e2f883db7": {
95
+ "5e8a3b8136455e3a85b9dcf76d10baf1f393dd094fb75d10b24e7349522b5dcc": {
96
96
  "source": {
97
97
  "path": "IntegTestStackUbuntu22.template.json",
98
98
  "packaging": "file"
@@ -100,7 +100,7 @@
100
100
  "destinations": {
101
101
  "current_account-current_region": {
102
102
  "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
103
- "objectKey": "ad8d8b125c235b50e9ac65a63f50cba22a3148b6b5a491832bba2d7e2f883db7.json",
103
+ "objectKey": "5e8a3b8136455e3a85b9dcf76d10baf1f393dd094fb75d10b24e7349522b5dcc.json",
104
104
  "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
105
105
  }
106
106
  }
@@ -10,7 +10,13 @@
10
10
  "IncludeSpace": false,
11
11
  "PasswordLength": 16,
12
12
  "SecretStringTemplate": "{\"username\":\"participant\"}"
13
- }
13
+ },
14
+ "Tags": [
15
+ {
16
+ "Key": "app",
17
+ "Value": "vscode-server"
18
+ }
19
+ ]
14
20
  },
15
21
  "UpdateReplacePolicy": "Delete",
16
22
  "DeletionPolicy": "Delete",
@@ -53,6 +59,12 @@
53
59
  ]
54
60
  ]
55
61
  }
62
+ ],
63
+ "Tags": [
64
+ {
65
+ "Key": "app",
66
+ "Value": "vscode-server"
67
+ }
56
68
  ]
57
69
  },
58
70
  "Metadata": {
@@ -103,11 +115,6 @@
103
115
  "S3Key": "781ab0ab74634cdaf61539ab208ab777829ef07097ac21f95b9e15a3b1eedc1b.zip"
104
116
  },
105
117
  "Description": "src/secret-retriever/secret-retriever.lambda.ts",
106
- "Environment": {
107
- "Variables": {
108
- "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1"
109
- }
110
- },
111
118
  "Handler": "index.handler",
112
119
  "MemorySize": 128,
113
120
  "Role": {
@@ -116,7 +123,13 @@
116
123
  "Arn"
117
124
  ]
118
125
  },
119
- "Runtime": "nodejs18.x",
126
+ "Runtime": "nodejs22.x",
127
+ "Tags": [
128
+ {
129
+ "Key": "app",
130
+ "Value": "vscode-server"
131
+ }
132
+ ],
120
133
  "Timeout": 10
121
134
  },
122
135
  "DependsOn": [
@@ -166,6 +179,12 @@
166
179
  ]
167
180
  ]
168
181
  }
182
+ ],
183
+ "Tags": [
184
+ {
185
+ "Key": "app",
186
+ "Value": "vscode-server"
187
+ }
169
188
  ]
170
189
  },
171
190
  "Metadata": {
@@ -254,7 +273,7 @@
254
273
  "S3Bucket": {
255
274
  "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
256
275
  },
257
- "S3Key": "4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e.zip"
276
+ "S3Key": "bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca.zip"
258
277
  },
259
278
  "Description": "AWS CDK resource provider framework - onEvent (IntegTestStackUbuntu22/IntegVSCodeServer/SecretRetrieveProvider)",
260
279
  "Environment": {
@@ -283,6 +302,12 @@
283
302
  "value"
284
303
  ]
285
304
  },
305
+ "Tags": [
306
+ {
307
+ "Key": "app",
308
+ "Value": "vscode-server"
309
+ }
310
+ ],
286
311
  "Timeout": 900
287
312
  },
288
313
  "DependsOn": [
@@ -317,10 +342,10 @@
317
342
  "Arn"
318
343
  ]
319
344
  },
345
+ "ServiceTimeout": 305,
320
346
  "SecretArn": {
321
347
  "Ref": "IntegVSCodeServerpasswordsecret202A5DB3"
322
- },
323
- "ServiceTimeout": 305
348
+ }
324
349
  },
325
350
  "UpdateReplacePolicy": "Delete",
326
351
  "DeletionPolicy": "Delete"
@@ -333,6 +358,10 @@
333
358
  "EnableDnsSupport": true,
334
359
  "InstanceTenancy": "default",
335
360
  "Tags": [
361
+ {
362
+ "Key": "app",
363
+ "Value": "vscode-server"
364
+ },
336
365
  {
337
366
  "Key": "Name",
338
367
  "Value": "IntegTestStackUbuntu22/IntegVSCodeServer/vpc"
@@ -364,6 +393,10 @@
364
393
  "CidrBlock": "10.0.0.0/17",
365
394
  "MapPublicIpOnLaunch": true,
366
395
  "Tags": [
396
+ {
397
+ "Key": "app",
398
+ "Value": "vscode-server"
399
+ },
367
400
  {
368
401
  "Key": "aws-cdk:subnet-name",
369
402
  "Value": "public"
@@ -396,6 +429,10 @@
396
429
  "Type": "AWS::EC2::RouteTable",
397
430
  "Properties": {
398
431
  "Tags": [
432
+ {
433
+ "Key": "app",
434
+ "Value": "vscode-server"
435
+ },
399
436
  {
400
437
  "Key": "Name",
401
438
  "Value": "IntegTestStackUbuntu22/IntegVSCodeServer/vpc/publicSubnet1"
@@ -476,6 +513,10 @@
476
513
  "CidrBlock": "10.0.128.0/17",
477
514
  "MapPublicIpOnLaunch": true,
478
515
  "Tags": [
516
+ {
517
+ "Key": "app",
518
+ "Value": "vscode-server"
519
+ },
479
520
  {
480
521
  "Key": "aws-cdk:subnet-name",
481
522
  "Value": "public"
@@ -508,6 +549,10 @@
508
549
  "Type": "AWS::EC2::RouteTable",
509
550
  "Properties": {
510
551
  "Tags": [
552
+ {
553
+ "Key": "app",
554
+ "Value": "vscode-server"
555
+ },
511
556
  {
512
557
  "Key": "Name",
513
558
  "Value": "IntegTestStackUbuntu22/IntegVSCodeServer/vpc/publicSubnet2"
@@ -578,6 +623,10 @@
578
623
  "Type": "AWS::EC2::InternetGateway",
579
624
  "Properties": {
580
625
  "Tags": [
626
+ {
627
+ "Key": "app",
628
+ "Value": "vscode-server"
629
+ },
581
630
  {
582
631
  "Key": "Name",
583
632
  "Value": "IntegTestStackUbuntu22/IntegVSCodeServer/vpc"
@@ -660,6 +709,12 @@
660
709
  "IpProtocol": "-1"
661
710
  }
662
711
  ],
712
+ "Tags": [
713
+ {
714
+ "Key": "app",
715
+ "Value": "vscode-server"
716
+ }
717
+ ],
663
718
  "VpcId": {
664
719
  "Ref": "IntegVSCodeServervpc93DDE887"
665
720
  }
@@ -689,7 +744,13 @@
689
744
  "IntegVSCodeServercfprefixlistIdGetPrefixListIdLogGroup171C2803": {
690
745
  "Type": "AWS::Logs::LogGroup",
691
746
  "Properties": {
692
- "RetentionInDays": 1
747
+ "RetentionInDays": 1,
748
+ "Tags": [
749
+ {
750
+ "Key": "app",
751
+ "Value": "vscode-server"
752
+ }
753
+ ]
693
754
  },
694
755
  "UpdateReplacePolicy": "Delete",
695
756
  "DeletionPolicy": "Delete",
@@ -718,7 +779,13 @@
718
779
  }
719
780
  ],
720
781
  "Version": "2012-10-17"
721
- }
782
+ },
783
+ "Tags": [
784
+ {
785
+ "Key": "app",
786
+ "Value": "vscode-server"
787
+ }
788
+ ]
722
789
  },
723
790
  "Metadata": {
724
791
  "cdk_nag": {
@@ -1050,6 +1117,12 @@
1050
1117
  },
1051
1118
  "PolicyName": "VSCodeInstanceInlinePolicy"
1052
1119
  }
1120
+ ],
1121
+ "Tags": [
1122
+ {
1123
+ "Key": "app",
1124
+ "Value": "vscode-server"
1125
+ }
1053
1126
  ]
1054
1127
  },
1055
1128
  "Metadata": {
@@ -1144,6 +1217,10 @@
1144
1217
  }
1145
1218
  ],
1146
1219
  "Tags": [
1220
+ {
1221
+ "Key": "app",
1222
+ "Value": "vscode-server"
1223
+ },
1147
1224
  {
1148
1225
  "Key": "Name",
1149
1226
  "Value": "VSCodeServer"
@@ -1281,7 +1358,13 @@
1281
1358
  }
1282
1359
  ],
1283
1360
  "PriceClass": "PriceClass_All"
1284
- }
1361
+ },
1362
+ "Tags": [
1363
+ {
1364
+ "Key": "app",
1365
+ "Value": "vscode-server"
1366
+ }
1367
+ ]
1285
1368
  },
1286
1369
  "Metadata": {
1287
1370
  "cdk_nag": {
@@ -1577,7 +1660,13 @@
1577
1660
  ]
1578
1661
  },
1579
1662
  "DocumentType": "Command",
1580
- "Name": "vscode-server-ubuntu-IntegTestStackUbuntu22"
1663
+ "Name": "vscode-server-ubuntu-IntegTestStackUbuntu22",
1664
+ "Tags": [
1665
+ {
1666
+ "Key": "app",
1667
+ "Value": "vscode-server"
1668
+ }
1669
+ ]
1581
1670
  }
1582
1671
  },
1583
1672
  "IntegVSCodeServerInstallerOnEventHandlerServiceRole59651FEF": {
@@ -1608,6 +1697,12 @@
1608
1697
  ]
1609
1698
  ]
1610
1699
  }
1700
+ ],
1701
+ "Tags": [
1702
+ {
1703
+ "Key": "app",
1704
+ "Value": "vscode-server"
1705
+ }
1611
1706
  ]
1612
1707
  },
1613
1708
  "Metadata": {
@@ -1717,14 +1812,9 @@
1717
1812
  "S3Bucket": {
1718
1813
  "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
1719
1814
  },
1720
- "S3Key": "512cf155ada4793b37a885c1aa6d9bb8f534e88bac6f63c69672d4d73df2decf.zip"
1815
+ "S3Key": "a9865c9d36c7aa999e28cb7926e7a3a8e0b6d0854b25131a172024c5777442fa.zip"
1721
1816
  },
1722
1817
  "Description": "src/installer/installer.lambda.ts",
1723
- "Environment": {
1724
- "Variables": {
1725
- "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1"
1726
- }
1727
- },
1728
1818
  "Handler": "index.handler",
1729
1819
  "MemorySize": 512,
1730
1820
  "Role": {
@@ -1733,7 +1823,13 @@
1733
1823
  "Arn"
1734
1824
  ]
1735
1825
  },
1736
- "Runtime": "nodejs18.x",
1826
+ "Runtime": "nodejs22.x",
1827
+ "Tags": [
1828
+ {
1829
+ "Key": "app",
1830
+ "Value": "vscode-server"
1831
+ }
1832
+ ],
1737
1833
  "Timeout": 300
1738
1834
  },
1739
1835
  "DependsOn": [
@@ -1783,6 +1879,12 @@
1783
1879
  ]
1784
1880
  ]
1785
1881
  }
1882
+ ],
1883
+ "Tags": [
1884
+ {
1885
+ "Key": "app",
1886
+ "Value": "vscode-server"
1887
+ }
1786
1888
  ]
1787
1889
  },
1788
1890
  "Metadata": {
@@ -1871,7 +1973,7 @@
1871
1973
  "S3Bucket": {
1872
1974
  "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
1873
1975
  },
1874
- "S3Key": "4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e.zip"
1976
+ "S3Key": "bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca.zip"
1875
1977
  },
1876
1978
  "Description": "AWS CDK resource provider framework - onEvent (IntegTestStackUbuntu22/IntegVSCodeServer/InstallerProvider)",
1877
1979
  "Environment": {
@@ -1900,6 +2002,12 @@
1900
2002
  "value"
1901
2003
  ]
1902
2004
  },
2005
+ "Tags": [
2006
+ {
2007
+ "Key": "app",
2008
+ "Value": "vscode-server"
2009
+ }
2010
+ ],
1903
2011
  "Timeout": 900
1904
2012
  },
1905
2013
  "DependsOn": [
@@ -2026,7 +2134,7 @@
2026
2134
  "S3Bucket": {
2027
2135
  "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
2028
2136
  },
2029
- "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip"
2137
+ "S3Key": "7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200.zip"
2030
2138
  },
2031
2139
  "Timeout": 900,
2032
2140
  "MemorySize": 128,
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.external=void 0,exports.handler=handler,exports.withRetries=withRetries;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)try{return await fn(...xs)}catch(e){if(attempts--<=0)throw e;await sleep(Math.floor(Math.random()*ms)),ms*=2}}}async function sleep(ms){return new Promise(ok=>setTimeout(ok,ms))}
@@ -50,7 +50,10 @@ var handler = async (event, context) => {
50
50
  if (resourcePropertiesPartial.PhysicalResourceId) {
51
51
  delete resourcePropertiesPartial.PhysicalResourceId;
52
52
  }
53
- console.log("ResourceProperties filtered after: %j", resourcePropertiesPartial);
53
+ console.log(
54
+ "ResourceProperties filtered after: %j",
55
+ resourcePropertiesPartial
56
+ );
54
57
  const parameters = {};
55
58
  for (const [key, value] of Object.entries(resourcePropertiesPartial)) {
56
59
  parameters[key] = [value];
@@ -58,10 +61,14 @@ var handler = async (event, context) => {
58
61
  console.log("mapped parameters: %j", parameters);
59
62
  let attemptNo = 0;
60
63
  let timeRemaining = context.getRemainingTimeInMillis();
61
- console.log(`Running SSM Document '${documentName}' on EC2 instance '${instanceId}'. Logging to '${cloudWatchLogGroupName}' with parameters: '${JSON.stringify(parameters)}'`);
64
+ console.log(
65
+ `Running SSM Document '${documentName}' on EC2 instance '${instanceId}'. Logging to '${cloudWatchLogGroupName}' with parameters: '${JSON.stringify(parameters)}'`
66
+ );
62
67
  while (true) {
63
68
  attemptNo += 1;
64
- console.log(`Attempt: ${attemptNo}. Time Remaining: ${timeRemaining / 1e3}s`);
69
+ console.log(
70
+ `Attempt: ${attemptNo}. Time Remaining: ${timeRemaining / 1e3}s`
71
+ );
65
72
  try {
66
73
  const response = await ssm.sendCommand({
67
74
  DocumentName: documentName,
@@ -81,23 +88,35 @@ var handler = async (event, context) => {
81
88
  case "InProgress":
82
89
  timeRemaining = context.getRemainingTimeInMillis();
83
90
  if (timeRemaining > SLEEP_MS) {
84
- console.log(`Instance ${instanceId} not ready: 'InProgress'. Sleeping: ${SLEEP_MS / 1e3}s`);
91
+ console.log(
92
+ `Instance ${instanceId} not ready: 'InProgress'. Sleeping: ${SLEEP_MS / 1e3}s`
93
+ );
85
94
  await new Promise((resolve) => setTimeout(resolve, SLEEP_MS));
86
95
  break;
87
96
  } else {
88
- throw new Error(`SSM Document ${documentName} on EC2 instance ${instanceId} timed out while lambda in progress`);
97
+ throw new Error(
98
+ `SSM Document ${documentName} on EC2 instance ${instanceId} timed out while lambda in progress`
99
+ );
89
100
  }
90
101
  case "Success":
91
102
  console.log(`Instance ${instanceId} successfully bootstrapped`);
92
103
  return { Data: responseData };
93
104
  case "TimedOut":
94
- throw new Error(`SSM Document ${documentName} on EC2 instance ${instanceId} timed out`);
105
+ throw new Error(
106
+ `SSM Document ${documentName} on EC2 instance ${instanceId} timed out`
107
+ );
95
108
  case "Cancelled":
96
- throw new Error(`SSM Document ${documentName} on EC2 instance ${instanceId} cancelled`);
109
+ throw new Error(
110
+ `SSM Document ${documentName} on EC2 instance ${instanceId} cancelled`
111
+ );
97
112
  case "Failed":
98
- throw new Error(`SSM Document ${documentName} on EC2 instance ${instanceId} failed`);
113
+ throw new Error(
114
+ `SSM Document ${documentName} on EC2 instance ${instanceId} failed`
115
+ );
99
116
  default:
100
- throw new Error(`SSM Document ${documentName} on EC2 instance ${instanceId} status ${command.Status}`);
117
+ throw new Error(
118
+ `SSM Document ${documentName} on EC2 instance ${instanceId} status ${command.Status}`
119
+ );
101
120
  }
102
121
  return { Data: responseData };
103
122
  } catch (error) {
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Retry=exports.includeStackTraces=exports.MISSING_PHYSICAL_ID_MARKER=exports.CREATE_FAILED_PHYSICAL_ID_MARKER=void 0,exports.submitResponse=submitResponse,exports.safeHandler=safeHandler,exports.redactDataFromPayload=redactDataFromPayload;const url=require("url"),outbound_1=require("./outbound"),util_1=require("./util");exports.CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",exports.MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function submitResponse(status,event,options={}){const json={Status:status,Reason:options.reason||status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||exports.MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:options.noEcho,Data:event.Data},responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;options?.noEcho?(0,util_1.log)("submit redacted response to cloudformation",loggingSafeUrl,redactDataFromPayload(json)):(0,util_1.log)("submit response to cloudformation",loggingSafeUrl,json);const retryOptions={attempts:5,sleep:1e3};await(0,util_1.withRetries)(retryOptions,outbound_1.httpRequest)({hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}},responseBody)}exports.includeStackTraces=!0;function safeHandler(block){return async event=>{if(event.RequestType==="Delete"&&event.PhysicalResourceId===exports.CREATE_FAILED_PHYSICAL_ID_MARKER){(0,util_1.log)("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{await block(event)}catch(e){if(e instanceof Retry)throw(0,util_1.log)("retry requested by handler"),e;event.PhysicalResourceId||(event.RequestType==="Create"?((0,util_1.log)("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),event.PhysicalResourceId=exports.CREATE_FAILED_PHYSICAL_ID_MARKER):(0,util_1.log)(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify({...event,ResponseURL:"..."})}`)),await submitResponse("FAILED",event,{reason:exports.includeStackTraces?e.stack:e.message})}}}function redactDataFromPayload(payload){const redactedPayload=JSON.parse(JSON.stringify(payload));if(redactedPayload.Data){const keys=Object.keys(redactedPayload.Data);for(const key of keys)redactedPayload.Data[key]="*****"}return redactedPayload}class Retry extends Error{}exports.Retry=Retry;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.httpRequest=exports.invokeFunction=exports.startExecution=void 0;const https=require("https"),client_lambda_1=require("@aws-sdk/client-lambda"),client_sfn_1=require("@aws-sdk/client-sfn"),FRAMEWORK_HANDLER_TIMEOUT=9e5,awsSdkConfig={httpOptions:{timeout:FRAMEWORK_HANDLER_TIMEOUT}};async function defaultHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}let sfn,lambda;async function defaultStartExecution(req){return sfn||(sfn=new client_sfn_1.SFN(awsSdkConfig)),sfn.startExecution(req)}async function defaultInvokeFunction(req){lambda||(lambda=new client_lambda_1.Lambda(awsSdkConfig));try{return await lambda.invoke(req)}catch{return await(0,client_lambda_1.waitUntilFunctionActiveV2)({client:lambda,maxWaitTime:300},{FunctionName:req.FunctionName}),await lambda.invoke(req)}}exports.startExecution=defaultStartExecution,exports.invokeFunction=defaultInvokeFunction,exports.httpRequest=defaultHttpRequest;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.httpRequest=exports.invokeFunction=exports.startExecution=void 0;const https=require("https"),client_lambda_1=require("@aws-sdk/client-lambda"),client_sfn_1=require("@aws-sdk/client-sfn"),FRAMEWORK_HANDLER_TIMEOUT=9e5,awsSdkConfig={httpOptions:{timeout:FRAMEWORK_HANDLER_TIMEOUT}};async function defaultHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}let sfn,lambda;async function defaultStartExecution(req){return sfn||(sfn=new client_sfn_1.SFN(awsSdkConfig)),sfn.startExecution(req)}async function defaultInvokeFunction(req){lambda||(lambda=new client_lambda_1.Lambda(awsSdkConfig));try{return await lambda.invoke(req)}catch{return await(0,client_lambda_1.waitUntilFunctionActiveV2)({client:lambda,maxWaitTime:300},{FunctionName:req.FunctionName}),lambda.invoke(req)}}exports.startExecution=defaultStartExecution,exports.invokeFunction=defaultInvokeFunction,exports.httpRequest=defaultHttpRequest;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getEnv=getEnv,exports.log=log,exports.withRetries=withRetries,exports.parseJsonPayload=parseJsonPayload;function getEnv(name){const value=process.env[name];if(!value)throw new Error(`The environment variable "${name}" is not defined`);return value}function log(title,...args){console.log("[provider-framework]",title,...args.map(x=>typeof x=="object"?JSON.stringify(x,void 0,2):x))}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)try{return await fn(...xs)}catch(e){if(attempts--<=0)throw e;await sleep(Math.floor(Math.random()*ms)),ms*=2}}}async function sleep(ms){return new Promise(ok=>setTimeout(ok,ms))}function parseJsonPayload(payload){const text=new TextDecoder().decode(Buffer.from(payload??""));if(!text)return{};try{return JSON.parse(text)}catch{throw new Error(`return values from user-handlers must be JSON objects. got: "${text}"`)}}