Skip to content

Commit 3e1fdbf

Browse files
committed
Use own NPM types package when using own API
1 parent f4511e8 commit 3e1fdbf

10 files changed

+25
-37
lines changed

package-lock.json

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

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"tough-cookie": "^4.0.0"
5151
},
5252
"devDependencies": {
53+
"@intersystems-community/intersystems-servermanager": "^3.0.0",
5354
"@types/vscode": "^1.63.0",
5455
"@types/glob": "^7.1.1",
5556
"@types/keytar": "^4.4.2",

src/api/addServer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as vscode from "vscode";
2-
import { IJSONServerSpec } from "../extension";
2+
import { IJSONServerSpec } from "@intersystems-community/intersystems-servermanager";
33
import { getServerNames } from "./getServerNames";
44

55
export async function addServer(

src/api/getPortalUriWithToken.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as vscode from "vscode";
22
import { Uri } from "vscode";
3-
import { extensionId, IServerSpec } from "../extension";
3+
import { IServerSpec } from "@intersystems-community/intersystems-servermanager";
4+
import { extensionId } from "../extension";
45
import { makeRESTRequest } from "../makeRESTRequest";
56

67
export enum BrowserTarget {

src/api/getServerNames.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as vscode from "vscode";
2-
import { IServerName } from "../extension";
2+
import { IServerName } from "@intersystems-community/intersystems-servermanager";
33
import { serverDetail } from "./getServerSummary";
44

55
export function getServerNames(scope?: vscode.ConfigurationScope, sorted?: boolean): IServerName[] {

src/api/getServerSpec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as vscode from "vscode";
22
import { AUTHENTICATION_PROVIDER } from "../authenticationProvider";
33
import { filePassword } from "../commands/managePasswords";
4-
import { IServerSpec } from "../extension";
4+
import { IServerSpec } from "@intersystems-community/intersystems-servermanager";
55
import { Keychain } from "../keychain";
66

77
interface ICredentialSet {

src/api/getServerSummary.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as vscode from "vscode";
2-
import { IServerName, IServerSpec } from "../extension";
2+
import { IServerName, IServerSpec } from "@intersystems-community/intersystems-servermanager";
33

44
export function getServerSummary(name: string, scope?: vscode.ConfigurationScope): IServerName | undefined {
55
const server: IServerSpec | undefined = vscode.workspace.getConfiguration("intersystems.servers", scope).get(name);

src/extension.ts

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"use strict";
22

33
import * as vscode from "vscode";
4+
import { IServerName, IServerSpec } from "@intersystems-community/intersystems-servermanager";
45
import { addServer } from "./api/addServer";
56
import { BrowserTarget, getPortalUriWithToken } from "./api/getPortalUriWithToken";
67
import { getServerNames } from "./api/getServerNames";
@@ -16,34 +17,6 @@ import { NamespaceTreeItem, ProjectTreeItem, ServerManagerView, ServerTreeItem,
1617
export const extensionId = "intersystems-community.servermanager";
1718
export let globalState: vscode.Memento;
1819

19-
export interface IServerName {
20-
name: string;
21-
description: string;
22-
detail: string;
23-
}
24-
25-
export interface IWebServerSpec {
26-
scheme?: string;
27-
host: string;
28-
port: number;
29-
pathPrefix?: string;
30-
}
31-
32-
export interface IServerSpec {
33-
name: string;
34-
webServer: IWebServerSpec;
35-
username?: string;
36-
password?: string;
37-
description?: string;
38-
}
39-
40-
export interface IJSONServerSpec {
41-
webServer: IWebServerSpec;
42-
username?: string;
43-
password?: string;
44-
description?: string;
45-
}
46-
4720
export function activate(context: vscode.ExtensionContext) {
4821

4922
const _onDidChangePassword = new vscode.EventEmitter<string>();

src/makeRESTRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import * as https from "https";
77
import tough = require("tough-cookie");
88
import * as vscode from "vscode";
99
import { AUTHENTICATION_PROVIDER } from "./authenticationProvider";
10-
import { IServerSpec } from "./extension";
10+
import { IServerSpec } from "@intersystems-community/intersystems-servermanager";
1111
import { getServerSpec } from "./api/getServerSpec";
1212

1313
axiosCookieJarSupport(axios);

src/ui/serverManagerView.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as vscode from "vscode";
22
import { getServerNames } from "../api/getServerNames";
33
import { credentialCache, getServerSpec } from "../api/getServerSpec";
44
import { getServerSummary } from "../api/getServerSummary";
5-
import { IServerName } from "../extension";
5+
import { IServerName } from "@intersystems-community/intersystems-servermanager";
66
import { makeRESTRequest } from "../makeRESTRequest";
77

88
const SETTINGS_VERSION = "v1";

0 commit comments

Comments
 (0)