Skip to content

Commit b9f8849

Browse files
authored
TLS Sync VS Code Extensions (#5260)
TLS Sync VSCode Extensions orchestrate `@rushstack/debug-certificate-manager` to create, trust, and sync certificates when using VSCode remotes (devcontainer, WSL, codespaces, tunnels, etc.).
1 parent 50727f8 commit b9f8849

File tree

119 files changed

+2993
-509
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+2993
-509
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,3 +123,6 @@ dist-storybook/
123123
# Heft temporary files
124124
.cache/
125125
.heft/
126+
127+
# VS Code test runner files
128+
.vscode-test/

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ These GitHub repositories provide supplementary resources for Rush Stack:
7575
| [/heft-plugins/heft-serverless-stack-plugin](./heft-plugins/heft-serverless-stack-plugin/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Fheft-serverless-stack-plugin.svg)](https://badge.fury.io/js/%40rushstack%2Fheft-serverless-stack-plugin) | [changelog](./heft-plugins/heft-serverless-stack-plugin/CHANGELOG.md) | [@rushstack/heft-serverless-stack-plugin](https://www.npmjs.com/package/@rushstack/heft-serverless-stack-plugin) |
7676
| [/heft-plugins/heft-storybook-plugin](./heft-plugins/heft-storybook-plugin/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Fheft-storybook-plugin.svg)](https://badge.fury.io/js/%40rushstack%2Fheft-storybook-plugin) | [changelog](./heft-plugins/heft-storybook-plugin/CHANGELOG.md) | [@rushstack/heft-storybook-plugin](https://www.npmjs.com/package/@rushstack/heft-storybook-plugin) |
7777
| [/heft-plugins/heft-typescript-plugin](./heft-plugins/heft-typescript-plugin/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Fheft-typescript-plugin.svg)](https://badge.fury.io/js/%40rushstack%2Fheft-typescript-plugin) | [changelog](./heft-plugins/heft-typescript-plugin/CHANGELOG.md) | [@rushstack/heft-typescript-plugin](https://www.npmjs.com/package/@rushstack/heft-typescript-plugin) |
78+
| [/heft-plugins/heft-vscode-extension-plugin](./heft-plugins/heft-vscode-extension-plugin/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Fheft-vscode-extension-plugin.svg)](https://badge.fury.io/js/%40rushstack%2Fheft-vscode-extension-plugin) | [changelog](./heft-plugins/heft-vscode-extension-plugin/CHANGELOG.md) | [@rushstack/heft-vscode-extension-plugin](https://www.npmjs.com/package/@rushstack/heft-vscode-extension-plugin) |
7879
| [/heft-plugins/heft-webpack4-plugin](./heft-plugins/heft-webpack4-plugin/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Fheft-webpack4-plugin.svg)](https://badge.fury.io/js/%40rushstack%2Fheft-webpack4-plugin) | [changelog](./heft-plugins/heft-webpack4-plugin/CHANGELOG.md) | [@rushstack/heft-webpack4-plugin](https://www.npmjs.com/package/@rushstack/heft-webpack4-plugin) |
7980
| [/heft-plugins/heft-webpack5-plugin](./heft-plugins/heft-webpack5-plugin/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Fheft-webpack5-plugin.svg)](https://badge.fury.io/js/%40rushstack%2Fheft-webpack5-plugin) | [changelog](./heft-plugins/heft-webpack5-plugin/CHANGELOG.md) | [@rushstack/heft-webpack5-plugin](https://www.npmjs.com/package/@rushstack/heft-webpack5-plugin) |
8081
| [/libraries/api-extractor-model](./libraries/api-extractor-model/) | [![npm version](https://badge.fury.io/js/%40microsoft%2Fapi-extractor-model.svg)](https://badge.fury.io/js/%40microsoft%2Fapi-extractor-model) | [changelog](./libraries/api-extractor-model/CHANGELOG.md) | [@microsoft/api-extractor-model](https://www.npmjs.com/package/@microsoft/api-extractor-model) |
@@ -98,6 +99,7 @@ These GitHub repositories provide supplementary resources for Rush Stack:
9899
| [/libraries/typings-generator](./libraries/typings-generator/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Ftypings-generator.svg)](https://badge.fury.io/js/%40rushstack%2Ftypings-generator) | [changelog](./libraries/typings-generator/CHANGELOG.md) | [@rushstack/typings-generator](https://www.npmjs.com/package/@rushstack/typings-generator) |
99100
| [/libraries/worker-pool](./libraries/worker-pool/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Fworker-pool.svg)](https://badge.fury.io/js/%40rushstack%2Fworker-pool) | [changelog](./libraries/worker-pool/CHANGELOG.md) | [@rushstack/worker-pool](https://www.npmjs.com/package/@rushstack/worker-pool) |
100101
| [/rigs/heft-node-rig](./rigs/heft-node-rig/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Fheft-node-rig.svg)](https://badge.fury.io/js/%40rushstack%2Fheft-node-rig) | [changelog](./rigs/heft-node-rig/CHANGELOG.md) | [@rushstack/heft-node-rig](https://www.npmjs.com/package/@rushstack/heft-node-rig) |
102+
| [/rigs/heft-vscode-extension-rig](./rigs/heft-vscode-extension-rig/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Fheft-vscode-extension-rig.svg)](https://badge.fury.io/js/%40rushstack%2Fheft-vscode-extension-rig) | [changelog](./rigs/heft-vscode-extension-rig/CHANGELOG.md) | [@rushstack/heft-vscode-extension-rig](https://www.npmjs.com/package/@rushstack/heft-vscode-extension-rig) |
101103
| [/rigs/heft-web-rig](./rigs/heft-web-rig/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Fheft-web-rig.svg)](https://badge.fury.io/js/%40rushstack%2Fheft-web-rig) | [changelog](./rigs/heft-web-rig/CHANGELOG.md) | [@rushstack/heft-web-rig](https://www.npmjs.com/package/@rushstack/heft-web-rig) |
102104
| [/rush-plugins/rush-amazon-s3-build-cache-plugin](./rush-plugins/rush-amazon-s3-build-cache-plugin/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Frush-amazon-s3-build-cache-plugin.svg)](https://badge.fury.io/js/%40rushstack%2Frush-amazon-s3-build-cache-plugin) | | [@rushstack/rush-amazon-s3-build-cache-plugin](https://www.npmjs.com/package/@rushstack/rush-amazon-s3-build-cache-plugin) |
103105
| [/rush-plugins/rush-azure-storage-build-cache-plugin](./rush-plugins/rush-azure-storage-build-cache-plugin/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Frush-azure-storage-build-cache-plugin.svg)](https://badge.fury.io/js/%40rushstack%2Frush-azure-storage-build-cache-plugin) | | [@rushstack/rush-azure-storage-build-cache-plugin](https://www.npmjs.com/package/@rushstack/rush-azure-storage-build-cache-plugin) |
@@ -108,6 +110,9 @@ These GitHub repositories provide supplementary resources for Rush Stack:
108110
| [/rush-plugins/rush-redis-cobuild-plugin](./rush-plugins/rush-redis-cobuild-plugin/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Frush-redis-cobuild-plugin.svg)](https://badge.fury.io/js/%40rushstack%2Frush-redis-cobuild-plugin) | | [@rushstack/rush-redis-cobuild-plugin](https://www.npmjs.com/package/@rushstack/rush-redis-cobuild-plugin) |
109111
| [/rush-plugins/rush-resolver-cache-plugin](./rush-plugins/rush-resolver-cache-plugin/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Frush-resolver-cache-plugin.svg)](https://badge.fury.io/js/%40rushstack%2Frush-resolver-cache-plugin) | | [@rushstack/rush-resolver-cache-plugin](https://www.npmjs.com/package/@rushstack/rush-resolver-cache-plugin) |
110112
| [/rush-plugins/rush-serve-plugin](./rush-plugins/rush-serve-plugin/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Frush-serve-plugin.svg)](https://badge.fury.io/js/%40rushstack%2Frush-serve-plugin) | | [@rushstack/rush-serve-plugin](https://www.npmjs.com/package/@rushstack/rush-serve-plugin) |
113+
| [/vscode-extensions/tls-sync-vscode-extension-pack](./vscode-extensions/tls-sync-vscode-extension-pack/) | [![npm version](https://badge.fury.io/js/tls-sync-vscode-extension-pack.svg)](https://badge.fury.io/js/tls-sync-vscode-extension-pack) | [changelog](./vscode-extensions/tls-sync-vscode-extension-pack/CHANGELOG.md) | [tls-sync-vscode-extension-pack](https://www.npmjs.com/package/tls-sync-vscode-extension-pack) |
114+
| [/vscode-extensions/tls-sync-vscode-ui-extension](./vscode-extensions/tls-sync-vscode-ui-extension/) | [![npm version](https://badge.fury.io/js/tls-sync-vscode-ui-extension.svg)](https://badge.fury.io/js/tls-sync-vscode-ui-extension) | | [tls-sync-vscode-ui-extension](https://www.npmjs.com/package/tls-sync-vscode-ui-extension) |
115+
| [/vscode-extensions/tls-sync-vscode-workspace-extension](./vscode-extensions/tls-sync-vscode-workspace-extension/) | [![npm version](https://badge.fury.io/js/tls-sync-vscode-workspace-extension.svg)](https://badge.fury.io/js/tls-sync-vscode-workspace-extension) | | [tls-sync-vscode-workspace-extension](https://www.npmjs.com/package/tls-sync-vscode-workspace-extension) |
111116
| [/webpack/hashed-folder-copy-plugin](./webpack/hashed-folder-copy-plugin/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Fhashed-folder-copy-plugin.svg)](https://badge.fury.io/js/%40rushstack%2Fhashed-folder-copy-plugin) | [changelog](./webpack/hashed-folder-copy-plugin/CHANGELOG.md) | [@rushstack/hashed-folder-copy-plugin](https://www.npmjs.com/package/@rushstack/hashed-folder-copy-plugin) |
112117
| [/webpack/loader-load-themed-styles](./webpack/loader-load-themed-styles/) | [![npm version](https://badge.fury.io/js/%40microsoft%2Floader-load-themed-styles.svg)](https://badge.fury.io/js/%40microsoft%2Floader-load-themed-styles) | [changelog](./webpack/loader-load-themed-styles/CHANGELOG.md) | [@microsoft/loader-load-themed-styles](https://www.npmjs.com/package/@microsoft/loader-load-themed-styles) |
113118
| [/webpack/loader-raw-script](./webpack/loader-raw-script/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Floader-raw-script.svg)](https://badge.fury.io/js/%40rushstack%2Floader-raw-script) | [changelog](./webpack/loader-raw-script/CHANGELOG.md) | [@rushstack/loader-raw-script](https://www.npmjs.com/package/@rushstack/loader-raw-script) |
@@ -218,6 +223,8 @@ These GitHub repositories provide supplementary resources for Rush Stack:
218223
| [/rush-plugins/rush-litewatch-plugin](./rush-plugins/rush-litewatch-plugin/) | An experimental alternative approach for multi-project watch mode |
219224
| [/vscode-extensions/rush-vscode-command-webview](./vscode-extensions/rush-vscode-command-webview/) | Part of the Rush Stack VSCode extension, provides a UI for invoking Rush commands |
220225
| [/vscode-extensions/rush-vscode-extension](./vscode-extensions/rush-vscode-extension/) | Enhanced experience for monorepos that use the Rush Stack toolchain |
226+
| [/vscode-extensions/tls-sync-vscode-shared](./vscode-extensions/tls-sync-vscode-shared/) | |
227+
| [/vscode-extensions/vscode-shared](./vscode-extensions/vscode-shared/) | |
221228
| [/webpack/webpack-deep-imports-plugin](./webpack/webpack-deep-imports-plugin/) | This plugin creates a bundle and commonJS files in a 'lib' folder mirroring modules in another 'lib' folder. |
222229
<!-- GENERATED PROJECT SUMMARY END -->
223230

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@rushstack/debug-certificate-manager",
5+
"comment": "CertificateStore - Add params to support custom paths and filenames",
6+
"type": "minor"
7+
},
8+
{
9+
"packageName": "@rushstack/debug-certificate-manager",
10+
"comment": "CertificateManager - Update `untrustCertificateAsync` to clear `caCertificateData`",
11+
"type": "minor"
12+
},
13+
{
14+
"packageName": "@rushstack/debug-certificate-manager",
15+
"comment": "CertificateManager - Use osascript (applescript) to run elevated command on macOS instead of sudo package.",
16+
"type": "minor"
17+
},
18+
{
19+
"packageName": "@rushstack/debug-certificate-manager",
20+
"comment": "CertificateManager - Expose `getCertificateExpirationAsync` method to retrieve certificate expiration date",
21+
"type": "minor"
22+
}
23+
],
24+
"packageName": "@rushstack/debug-certificate-manager"
25+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@rushstack/heft-vscode-extension-plugin",
5+
"comment": "Add new Heft plugin to package files into a VSIX file",
6+
"type": "minor"
7+
}
8+
],
9+
"packageName": "@rushstack/heft-vscode-extension-plugin"
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@rushstack/heft-vscode-extension-rig",
5+
"comment": "Add new rig to build VS Code extensions",
6+
"type": "minor"
7+
}
8+
],
9+
"packageName": "@rushstack/heft-vscode-extension-rig"
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@rushstack/node-core-library",
5+
"comment": "Add a `Async.runWithTimeoutAsync` function that executes an async function, resolving if the specified timeout elapses first.",
6+
"type": "minor"
7+
}
8+
],
9+
"packageName": "@rushstack/node-core-library"
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@rushstack/tls-sync-vscode-shared",
5+
"comment": "Add shared utilities for the Workspace and UI TLS Sync VS Code extensions",
6+
"type": "minor"
7+
}
8+
],
9+
"packageName": "@rushstack/tls-sync-vscode-shared"
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "tls-sync-vscode-extension-pack",
5+
"comment": "Add VSCode Extension to sync TLS certificates when using VS Code remoting.",
6+
"type": "minor"
7+
}
8+
],
9+
"packageName": "tls-sync-vscode-extension-pack"
10+
}

common/config/azure-pipelines/vscode-extension-publish.yaml

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,26 @@ variables:
22
- name: FORCE_COLOR
33
value: 1
44

5+
parameters:
6+
- name: shouldPublish
7+
type: boolean
8+
default: true
9+
- name: ExtensionPublishConfig
10+
type: object
11+
default:
12+
- key: 'tls-sync-vscode-ui-extension'
13+
vsixPath: 'dist/vsix/packaged.vsix'
14+
projectPath: '$(Build.SourcesDirectory)/vscode-extensions/tls-sync-vscode-ui-extension'
15+
- key: 'tls-sync-vscode-workspace-extension'
16+
vsixPath: 'dist/vsix/packaged.vsix'
17+
projectPath: '$(Build.SourcesDirectory)/vscode-extensions/tls-sync-vscode-workspace-extension'
18+
- key: 'tls-sync-vscode-extension-pack'
19+
vsixPath: 'dist/vsix/packaged.vsix'
20+
projectPath: '$(Build.SourcesDirectory)/vscode-extensions/tls-sync-vscode-extension-pack'
21+
- key: 'rush-vscode-extension'
22+
vsixPath: 'dist/vsix/packaged.vsix'
23+
projectPath: '$(Build.SourcesDirectory)/vscode-extensions/rush-vscode-extension'
24+
525
resources:
626
repositories:
727
- repository: 1esPipelines
@@ -22,6 +42,14 @@ extends:
2242
pool:
2343
name: publish-rushstack
2444
os: linux
45+
templateContext:
46+
outputs:
47+
- ${{ each extension in parameters.ExtensionPublishConfig }}:
48+
- output: pipelineArtifact
49+
artifactName: ${{ extension.key }}
50+
targetPath: ${{ extension.projectPath }}/${{ extension.vsixPath }}
51+
displayName: 'Publish Artifact: ${{ extension.key }}'
52+
2553
steps:
2654
- checkout: self
2755
persistCredentials: true
@@ -31,14 +59,16 @@ extends:
3159
- template: /common/config/azure-pipelines/templates/build.yaml@self
3260
parameters:
3361
BuildParameters: >
34-
--to rushstack
35-
36-
- script: node $(Build.SourcesDirectory)/common/scripts/install-run-rushx.js package
37-
workingDirectory: $(Build.SourcesDirectory)/vscode-extensions/rush-vscode-extension
38-
displayName: 'Package vscode extension'
62+
--to tag:vsix
3963
40-
- script: node $(Build.SourcesDirectory)/common/scripts/install-run-rushx.js deploy
41-
workingDirectory: $(Build.SourcesDirectory)/vscode-extensions/rush-vscode-extension
42-
displayName: 'Publish vscode extension'
43-
env:
44-
VSCE_PAT: $(vscePat)
64+
- ${{ if parameters.shouldPublish }}:
65+
- ${{ each extension in parameters.ExtensionPublishConfig }}:
66+
- task: AzureCLI@2
67+
displayName: 'Publish VSIX: ${{ extension.key }}'
68+
inputs:
69+
azureSubscription: rushstack-vscode-publish
70+
scriptType: 'bash'
71+
scriptLocation: 'inlineScript'
72+
inlineScript: |
73+
node node_modules/@rushstack/heft-vscode-extension-rig/node_modules/@rushstack/heft-vscode-extension-plugin/node_modules/@vscode/vsce/vsce publish --no-dependencies --azure-credential --packagePath ${{ extension.vsixPath }}
74+
workingDirectory: ${{ extension.projectPath }}

common/config/rush/nonbrowser-approved-packages.json

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
},
121121
{
122122
"name": "@rushstack/debug-certificate-manager",
123-
"allowedCategories": [ "libraries" ]
123+
"allowedCategories": [ "libraries", "vscode-extensions" ]
124124
},
125125
{
126126
"name": "@rushstack/eslint-bulk",
@@ -210,6 +210,14 @@
210210
"name": "@rushstack/heft-typescript-plugin",
211211
"allowedCategories": [ "libraries", "tests", "vscode-extensions" ]
212212
},
213+
{
214+
"name": "@rushstack/heft-vscode-extension-plugin",
215+
"allowedCategories": [ "libraries", "vscode-extensions" ]
216+
},
217+
{
218+
"name": "@rushstack/heft-vscode-extension-rig",
219+
"allowedCategories": [ "vscode-extensions" ]
220+
},
213221
{
214222
"name": "@rushstack/heft-web-rig",
215223
"allowedCategories": [ "libraries", "tests", "vscode-extensions" ]
@@ -306,6 +314,10 @@
306314
"name": "@rushstack/terminal",
307315
"allowedCategories": [ "libraries", "tests", "vscode-extensions" ]
308316
},
317+
{
318+
"name": "@rushstack/tls-sync-vscode-shared",
319+
"allowedCategories": [ "vscode-extensions" ]
320+
},
309321
{
310322
"name": "@rushstack/tree-pattern",
311323
"allowedCategories": [ "libraries" ]
@@ -318,6 +330,10 @@
318330
"name": "@rushstack/typings-generator",
319331
"allowedCategories": [ "libraries" ]
320332
},
333+
{
334+
"name": "@rushstack/vscode-shared",
335+
"allowedCategories": [ "vscode-extensions" ]
336+
},
321337
{
322338
"name": "@rushstack/webpack-deep-imports-plugin",
323339
"allowedCategories": [ "libraries" ]
@@ -430,6 +446,10 @@
430446
"name": "@vscode/test-electron",
431447
"allowedCategories": [ "vscode-extensions" ]
432448
},
449+
{
450+
"name": "@vscode/vsce",
451+
"allowedCategories": [ "libraries", "vscode-extensions" ]
452+
},
433453
{
434454
"name": "@yarnpkg/lockfile",
435455
"allowedCategories": [ "libraries" ]
@@ -942,6 +962,14 @@
942962
"name": "timsort",
943963
"allowedCategories": [ "libraries" ]
944964
},
965+
{
966+
"name": "tls-sync-vscode-ui-extension",
967+
"allowedCategories": [ "vscode-extensions" ]
968+
},
969+
{
970+
"name": "tls-sync-vscode-workspace-extension",
971+
"allowedCategories": [ "vscode-extensions" ]
972+
},
945973
{
946974
"name": "true-case-path",
947975
"allowedCategories": [ "libraries" ]
@@ -970,10 +998,6 @@
970998
"name": "uuid",
971999
"allowedCategories": [ "libraries" ]
9721000
},
973-
{
974-
"name": "vsce",
975-
"allowedCategories": [ "vscode-extensions" ]
976-
},
9771001
{
9781002
"name": "watchpack",
9791003
"allowedCategories": [ "libraries" ]

0 commit comments

Comments
 (0)