change the extensionKind to be a "workspace" extension only ("extensionKind": ["workspace"]). This means the user will have to install the extension into a remote container.
change the implementation of the express configuration support so that it doesn't access the filesystem directly using the fs module but uses the vscode workspace file system API (vscode.workspace.fs). With this implementation change the extension can be run both as a 'ui' and a 'workspace' extension.
provide the express configuration support in a separate extension that has the extensionkind workspace ("extensionKind": ["workspace"]).
In general we prefer that customizations like themes and snippets are have the following "extensionKind": ["ui", "workspace"].
The extension is currently defined as a 'ui' extension. This is correct when it comes to snippets, they run fine in the UI extension host only.
However, the extension also provides a command that configures an express setup "Add Node.js express file to workspace". This command writes files to the workspace https://github.com/johnpapa/vscode-angular-snippets/blob/ecf7345e6bd782c8b72862b1e5d84f69cab73604/src/configureWorkspace/configure.ts#L80. This will fail when run in a remote setup, since the extension runs in the UI extension host where there is no access to the workspace.
There are several options:
"extensionKind": ["workspace"]
). This means the user will have to install the extension into a remote container.fs
module but uses the vscode workspace file system API (vscode.workspace.fs
). With this implementation change the extension can be run both as a 'ui' and a 'workspace' extension."extensionKind": ["workspace"]
).In general we prefer that customizations like themes and snippets are have the following
"extensionKind": ["ui", "workspace"]
.