Skip to content

Commit bb56abd

Browse files
Merge pull request #134 from gjsjohnmurray/pre-sync-2.0.9
Sync prerelease with 2.0.9
2 parents 600a930 + 5c08381 commit bb56abd

File tree

7 files changed

+185
-14683
lines changed

7 files changed

+185
-14683
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 3.1.2022042001 (20-Apr-2022 pre-release)
2+
* Add 2.0.8 and 2.0.9 changes.
3+
14
## 3.1.2022020201 (02-Feb-2022 pre-release)
25
* Update vulnerable dependencies.
36

@@ -10,6 +13,16 @@
1013

1114
## 3.0.0 (27-Nov-2021 pre-release)
1215
* Implement `intersystems-server-credentials` authentication provider.
16+
*
17+
## 2.0.9 (20-Apr-2022)
18+
* Add support for server-side projects (#131).
19+
20+
## 2.0.8 (28-Mar-2022)
21+
* Update vulnerable dependencies.
22+
23+
## 2.0.7 (02-Feb-2022)
24+
* Also import user-specific connections from Windows registry (#107).
25+
* Update vulnerable dependencies.
1326

1427
## 2.0.6 (28-Sep-2021)
1528
* Apply `pathPrefix` correctly (#95, #99).

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# InterSystems Server Manager
22

3+
> **Note:** The best way to install and use this extension is by installing the [InterSystems ObjectScript Extension Pack](https://marketplace.visualstudio.com/items?itemName=intersystems-community.objectscript-pack) and following the [documentation here](https://intersystems-community.github.io/vscode-objectscript/).
34
45
InterSystems Server Manager is a Visual Studio Code extension for defining connections to [InterSystems](https://www.intersystems.com/) servers. These definitions can used by other VS Code extensions when they make connections. One example is the [ObjectScript extension](https://github.com/intersystems-community/vscode-objectscript) for code editing.
56

@@ -11,7 +12,7 @@ We are pleased to publish version 3 of this extension which improves the securit
1112

1213
> 2022-01-26: This is currently a **pre-release**.
1314
14-
> Thanks to [George James Software](https://georgejames.com) for backing this development effort.
15+
Thanks to [George James Software](https://georgejames.com) for backing this development effort.
1516

1617
## The Authentication Provider
1718

package-lock.json

Lines changed: 33 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "servermanager",
33
"displayName": "InterSystems Server Manager",
4-
"version": "3.1.2022020202-SNAPSHOT",
4+
"version": "3.1.2022042001-SNAPSHOT",
55
"preview": true,
66
"publisher": "intersystems-community",
77
"description": "Define connections to InterSystems servers. Browse and manage those servers.",
@@ -16,8 +16,7 @@
1616
"multi-root ready"
1717
],
1818
"engines": {
19-
"vscode": "^1.63.0",
20-
"node": "^10.2.0"
19+
"vscode": "^1.63.0"
2120
},
2221
"icon": "images/logo.png",
2322
"categories": [
@@ -52,6 +51,7 @@
5251
"tough-cookie": "^4.0.0"
5352
},
5453
"devDependencies": {
54+
"@types/vscode": "^1.63.0",
5555
"@types/glob": "^7.1.1",
5656
"@types/keytar": "^4.4.2",
5757
"@types/mocha": "^9.0.0",
@@ -425,6 +425,16 @@
425425
"command": "intersystems-community.servermanager.viewNamespaceWebAppFiles",
426426
"title": "View Web Application Files",
427427
"icon": "$(telescope)"
428+
},
429+
{
430+
"command": "intersystems-community.servermanager.editProject",
431+
"title": "Edit Code in Project",
432+
"icon": "$(edit)"
433+
},
434+
{
435+
"command": "intersystems-community.servermanager.viewProject",
436+
"title": "View Code in Project",
437+
"icon": "$(eye)"
428438
}
429439
],
430440
"submenus": [
@@ -532,6 +542,14 @@
532542
{
533543
"command": "intersystems-community.servermanager.viewNamespaceWebAppFiles",
534544
"when": "false"
545+
},
546+
{
547+
"command": "intersystems-community.servermanager.editProject",
548+
"when": "false"
549+
},
550+
{
551+
"command": "intersystems-community.servermanager.viewProject",
552+
"when": "false"
535553
}
536554
],
537555
"view/title": [
@@ -589,6 +607,16 @@
589607
"when": "view == intersystems-community_servermanager && viewItem =~ /namespace$/",
590608
"group": "inline@20"
591609
},
610+
{
611+
"command": "intersystems-community.servermanager.editProject",
612+
"when": "view == intersystems-community_servermanager && viewItem == project",
613+
"group": "inline@10"
614+
},
615+
{
616+
"command": "intersystems-community.servermanager.viewProject",
617+
"when": "view == intersystems-community_servermanager && viewItem == project",
618+
"group": "inline@20"
619+
},
592620
{
593621
"command": "intersystems-community.servermanager.openPortalTab",
594622
"when": "view == intersystems-community_servermanager && viewItem =~ /\\.server\\./",

src/extension.ts

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { AUTHENTICATION_PROVIDER, ServerManagerAuthenticationProvider } from "./
1111
import { importFromRegistry } from "./commands/importFromRegistry";
1212
import { clearPassword, storePassword } from "./commands/managePasswords";
1313
import { cookieJar } from "./makeRESTRequest";
14-
import { ServerManagerView, ServerTreeItem, SMTreeItem } from "./ui/serverManagerView";
14+
import { NamespaceTreeItem, ProjectTreeItem, ServerManagerView, ServerTreeItem, SMTreeItem } from "./ui/serverManagerView";
1515

1616
export const extensionId = "intersystems-community.servermanager";
1717
export let globalState: vscode.Memento;
@@ -345,7 +345,7 @@ export function activate(context: vscode.ExtensionContext) {
345345
}),
346346
);
347347

348-
const addWorkspaceFolderAsync = async (readonly: boolean, csp: boolean, namespaceTreeItem?: ServerTreeItem) => {
348+
const addWorkspaceFolderAsync = async (readonly: boolean, csp: boolean, namespaceTreeItem?: ServerTreeItem, project?: string) => {
349349
if (namespaceTreeItem) {
350350
const pathParts = namespaceTreeItem.id?.split(":");
351351
if (pathParts && pathParts.length === 4) {
@@ -368,11 +368,10 @@ export function activate(context: vscode.ExtensionContext) {
368368
return;
369369
}
370370

371-
const uri = vscode.Uri.parse(`isfs${readonly ? "-readonly" : ""}://${serverName}:${namespace}/${csp ? "?csp" : ""}`);
372-
if ((vscode.workspace.workspaceFolders || [])
373-
.filter((workspaceFolder) => workspaceFolder.uri.toString() === uri.toString())
374-
.length === 0) {
375-
const label = `${serverName}:${namespace}${csp ? " webfiles" : ""}${readonly ? " (read-only)" : ""}`;
371+
const params = [ csp ? "csp" : "", project ? `project=${project}` : ""].filter(e => e != "").join("&");
372+
const uri = vscode.Uri.parse(`isfs${readonly ? "-readonly" : ""}://${serverName}:${namespace}/${params ? `?${params}` : ""}`);
373+
if ((vscode.workspace.workspaceFolders || []).filter((workspaceFolder) => workspaceFolder.uri.toString() === uri.toString()).length === 0) {
374+
const label = `${project ? `${project} - ` : ""}${serverName}:${namespace}${csp ? ' web files' : ''}${readonly && project == undefined ? " (read-only)" : ""}`;
376375
const added = vscode.workspace.updateWorkspaceFolders(
377376
vscode.workspace.workspaceFolders ? vscode.workspace.workspaceFolders.length : 0,
378377
0,
@@ -420,6 +419,18 @@ export function activate(context: vscode.ExtensionContext) {
420419
}),
421420
);
422421

422+
context.subscriptions.push(
423+
vscode.commands.registerCommand(`${extensionId}.editProject`, async (projectTreeItem?: ProjectTreeItem) => {
424+
await addWorkspaceFolderAsync(false, false, <NamespaceTreeItem>projectTreeItem?.parent?.parent, projectTreeItem?.name);
425+
})
426+
);
427+
428+
context.subscriptions.push(
429+
vscode.commands.registerCommand(`${extensionId}.viewProject`, async (projectTreeItem?: ProjectTreeItem) => {
430+
await addWorkspaceFolderAsync(true, false, <NamespaceTreeItem>projectTreeItem?.parent?.parent, projectTreeItem?.name);
431+
})
432+
);
433+
423434
// Listen for relevant configuration changes
424435
context.subscriptions.push(vscode.workspace.onDidChangeConfiguration((e) => {
425436
if (e.affectsConfiguration("intersystems.servers") || e.affectsConfiguration("objectscript.conn")) {

0 commit comments

Comments
 (0)