@halcyontech/vscode-ibmi-types 1.6.14 → 1.7.6
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.
- package/api/Configuration.d.ts +8 -1
- package/api/CustomUI.d.ts +84 -56
- package/api/IBMi.d.ts +3 -2
- package/api/Instance.d.ts +12 -12
- package/api/Search.d.ts +3 -1
- package/api/Storage.d.ts +31 -6
- package/api/Tools.d.ts +2 -0
- package/api/debug/certificates.d.ts +6 -0
- package/api/debug/index.d.ts +10 -0
- package/api/debug/server.d.ts +10 -0
- package/api/local/deployment.d.ts +1 -2
- package/extension.d.ts +1 -1
- package/instantiate.d.ts +1 -8
- package/package.json +1 -1
- package/typings.d.ts +6 -7
package/api/Configuration.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
/// <reference types="vscode" />
|
2
|
+
export declare type SourceDateMode = "edit" | "diff";
|
2
3
|
export declare namespace GlobalConfiguration {
|
3
4
|
function get<T>(prop: string): T | undefined;
|
4
5
|
function set(key: string, value: any): Thenable<void>;
|
@@ -17,7 +18,7 @@ export declare namespace ConnectionConfiguration {
|
|
17
18
|
autoConvertIFSccsid: boolean;
|
18
19
|
hideCompileErrors: string[];
|
19
20
|
enableSourceDates: boolean;
|
20
|
-
sourceDateMode:
|
21
|
+
sourceDateMode: SourceDateMode;
|
21
22
|
sourceDateGutter: boolean;
|
22
23
|
encodingFor5250: string;
|
23
24
|
terminalFor5250: string;
|
@@ -25,6 +26,11 @@ export declare namespace ConnectionConfiguration {
|
|
25
26
|
connectringStringFor5250: string;
|
26
27
|
autoSaveBeforeAction: boolean;
|
27
28
|
showDescInLibList: boolean;
|
29
|
+
debugPort: string;
|
30
|
+
debugIsSecure: boolean;
|
31
|
+
debugUpdateProductionFiles: boolean;
|
32
|
+
debugEnableDebugTracing: boolean;
|
33
|
+
readOnlyMode: boolean;
|
28
34
|
[name: string]: any;
|
29
35
|
}
|
30
36
|
interface ObjectFilters {
|
@@ -34,6 +40,7 @@ export declare namespace ConnectionConfiguration {
|
|
34
40
|
types: string[];
|
35
41
|
member: string;
|
36
42
|
memberType: string;
|
43
|
+
protected: boolean;
|
37
44
|
}
|
38
45
|
interface CustomVariable {
|
39
46
|
name: string;
|
package/api/CustomUI.d.ts
CHANGED
@@ -1,64 +1,92 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
import vscode from 'vscode';
|
2
|
+
export interface Page<T> {
|
3
|
+
panel: vscode.WebviewPanel;
|
4
|
+
data?: T;
|
5
|
+
}
|
6
|
+
export interface Button {
|
7
|
+
id: string;
|
8
|
+
label: string;
|
9
|
+
}
|
10
|
+
export interface SelectItem {
|
11
|
+
text: string;
|
12
|
+
description: string;
|
13
|
+
value: string;
|
14
|
+
selected?: boolean;
|
15
|
+
}
|
16
|
+
export interface Tab {
|
17
|
+
label: string;
|
18
|
+
value: string;
|
19
|
+
}
|
20
|
+
export interface ComplexTab {
|
21
|
+
label: string;
|
3
22
|
fields: Field[];
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
23
|
+
}
|
24
|
+
export declare class Section {
|
25
|
+
readonly fields: Field[];
|
26
|
+
addHorizontalRule(): this;
|
27
|
+
addCheckbox(id: string, label: string, description?: string, checked?: boolean): this;
|
28
|
+
addInput(id: string, label: string, description?: string, options?: {
|
29
|
+
default?: string;
|
30
|
+
readonly?: boolean;
|
31
|
+
multiline?: boolean;
|
32
|
+
}): this;
|
33
|
+
addParagraph(label: string): this;
|
34
|
+
addFile(id: string, label: string, description?: string): this;
|
35
|
+
addPassword(id: string, label: string, description?: string, defaultValue?: string): this;
|
36
|
+
addTabs(tabs: Tab[], selected?: number): this;
|
37
|
+
addComplexTabs(tabs: ComplexTab[], selected?: number): this;
|
38
|
+
addSelect(id: string, label: string, items: SelectItem[], description?: string): this;
|
39
|
+
addTree(id: string, label: string, treeItems: TreeListItem[], description?: string): this;
|
40
|
+
addButtons(...buttons: Button[]): this;
|
41
|
+
addField(field: Field): this;
|
42
|
+
}
|
43
|
+
export declare class CustomUI extends Section {
|
8
44
|
/**
|
9
45
|
* If no callback is provided, a Promise will be returned
|
10
|
-
* @param
|
11
|
-
* @param
|
12
|
-
* @returns
|
46
|
+
* @param title
|
47
|
+
* @param callback
|
48
|
+
* @returns a Promise<Page<T>> if no callback is provided
|
13
49
|
*/
|
14
|
-
loadPage(title: string, callback?:
|
15
|
-
|
16
|
-
data: object;
|
17
|
-
}>;
|
18
|
-
getHTML(panel: any): string;
|
50
|
+
loadPage<T>(title: string, callback?: (page: Page<T>) => void): Promise<Page<T>> | undefined;
|
51
|
+
private getHTML;
|
19
52
|
}
|
20
|
-
export
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
constructor(type: "input" | "password" | "submit" | "buttons" | "checkbox" | "file" | "tabs" | "tree" | "select" | "paragraph" | "hr", id?: string, label?: string);
|
28
|
-
/** @type {"input"|"password"|"submit"|"buttons"|"checkbox"|"file"|"tabs"|"tree"|"select"|"paragraph"|"hr"} */
|
29
|
-
type: "input" | "password" | "submit" | "buttons" | "checkbox" | "file" | "tabs" | "tree" | "select" | "paragraph" | "hr";
|
30
|
-
/** @type {string} */
|
31
|
-
id: string;
|
32
|
-
/** @type {string} */
|
53
|
+
export declare type FieldType = "input" | "password" | "submit" | "buttons" | "checkbox" | "file" | "complexTabs" | "tabs" | "tree" | "select" | "paragraph" | "hr";
|
54
|
+
export interface TreeListItemIcon {
|
55
|
+
branch?: string;
|
56
|
+
open?: string;
|
57
|
+
leaf?: string;
|
58
|
+
}
|
59
|
+
export interface TreeListItem {
|
33
60
|
label: string;
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
61
|
+
subItems?: TreeListItem[];
|
62
|
+
open?: boolean;
|
63
|
+
selected?: boolean;
|
64
|
+
focused?: boolean;
|
65
|
+
icons?: TreeListItemIcon;
|
66
|
+
value?: string;
|
67
|
+
path?: number[];
|
68
|
+
}
|
69
|
+
export interface FieldItem {
|
70
|
+
label?: string;
|
71
|
+
value?: string;
|
72
|
+
selected?: boolean;
|
73
|
+
description?: string;
|
74
|
+
text?: string;
|
75
|
+
id?: string;
|
76
|
+
}
|
77
|
+
export declare class Field {
|
78
|
+
readonly type: FieldType;
|
79
|
+
readonly id: string;
|
80
|
+
readonly label: string;
|
81
|
+
readonly description?: string;
|
82
|
+
items?: FieldItem[];
|
83
|
+
treeList?: TreeListItem[];
|
84
|
+
complexTabItems?: ComplexTab[];
|
85
|
+
default?: string;
|
86
|
+
readonly?: boolean;
|
87
|
+
multiline?: boolean;
|
88
|
+
constructor(type: FieldType, id: string, label: string, description?: string);
|
62
89
|
getHTML(): string;
|
90
|
+
private renderLabel;
|
91
|
+
private renderDescription;
|
63
92
|
}
|
64
|
-
import vscode = require("vscode");
|
package/api/IBMi.d.ts
CHANGED
@@ -20,8 +20,7 @@ export default class IBMi {
|
|
20
20
|
[name: string]: string;
|
21
21
|
};
|
22
22
|
defaultUserLibraries: string[];
|
23
|
-
outputChannel
|
24
|
-
subscriptions: vscode.Disposable[];
|
23
|
+
outputChannel?: vscode.OutputChannel;
|
25
24
|
aspInfo: {
|
26
25
|
[id: number]: string;
|
27
26
|
};
|
@@ -55,7 +54,9 @@ export default class IBMi {
|
|
55
54
|
*/
|
56
55
|
paseCommand(command: string, directory?: string, returnType?: number, standardIO?: StandardIO): Promise<String | CommandResult>;
|
57
56
|
sendCommand(options: CommandData): Promise<CommandResult>;
|
57
|
+
private appendOutput;
|
58
58
|
private determineClear;
|
59
|
+
end(): Promise<void>;
|
59
60
|
/**
|
60
61
|
* Generates path to a temp file on the IBM i
|
61
62
|
* @param {string} key Key to the temp file to be re-used
|
package/api/Instance.d.ts
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
import * as vscode from "vscode";
|
2
2
|
import IBMi from "./IBMi";
|
3
3
|
import IBMiContent from "./IBMiContent";
|
4
|
-
import {
|
4
|
+
import { ConnectionStorage } from "./Storage";
|
5
5
|
import { ConnectionConfiguration } from "./Configuration";
|
6
|
+
import { IBMiEvent } from "../typings";
|
6
7
|
export default class Instance {
|
7
|
-
connection
|
8
|
-
content
|
9
|
-
storage
|
10
|
-
emitter
|
11
|
-
events
|
12
|
-
|
13
|
-
|
14
|
-
}[];
|
15
|
-
constructor();
|
8
|
+
private connection;
|
9
|
+
private content;
|
10
|
+
private storage;
|
11
|
+
private emitter;
|
12
|
+
private events;
|
13
|
+
constructor(context: vscode.ExtensionContext);
|
14
|
+
setConnection(connection?: IBMi): Promise<void>;
|
16
15
|
getConnection(): IBMi;
|
17
16
|
setConfig(newConfig: ConnectionConfiguration.Parameters): Promise<void>;
|
18
17
|
getConfig(): ConnectionConfiguration.Parameters;
|
19
18
|
getContent(): IBMiContent;
|
20
|
-
getStorage():
|
21
|
-
onEvent(event:
|
19
|
+
getStorage(): ConnectionStorage;
|
20
|
+
onEvent(event: IBMiEvent, func: Function): void;
|
21
|
+
fire(event: IBMiEvent): void;
|
22
22
|
}
|
package/api/Search.d.ts
CHANGED
@@ -3,11 +3,13 @@ export declare namespace Search {
|
|
3
3
|
interface Result {
|
4
4
|
path: string;
|
5
5
|
lines: Line[];
|
6
|
+
filter?: string;
|
7
|
+
label?: string;
|
6
8
|
}
|
7
9
|
interface Line {
|
8
10
|
number: number;
|
9
11
|
content: string;
|
10
12
|
}
|
11
|
-
function searchMembers(instance: Instance, library: string, sourceFile: string, memberFilter: string, searchTerm: string): Promise<Result[]>;
|
13
|
+
function searchMembers(instance: Instance, library: string, sourceFile: string, memberFilter: string, searchTerm: string, filter?: string): Promise<Result[]>;
|
12
14
|
function searchIFS(instance: Instance, path: string, searchTerm: string): Promise<Result[]>;
|
13
15
|
}
|
package/api/Storage.d.ts
CHANGED
@@ -1,12 +1,34 @@
|
|
1
1
|
import vscode from 'vscode';
|
2
2
|
export declare type PathContent = Record<string, string[]>;
|
3
3
|
export declare type DeploymentPath = Record<string, string>;
|
4
|
-
export declare
|
5
|
-
|
6
|
-
readonly
|
7
|
-
constructor(context: vscode.ExtensionContext
|
8
|
-
|
9
|
-
|
4
|
+
export declare type DebugCommands = Record<string, string>;
|
5
|
+
declare abstract class Storage {
|
6
|
+
protected readonly globalState: any;
|
7
|
+
constructor(context: vscode.ExtensionContext);
|
8
|
+
protected get<T>(key: string): T | undefined;
|
9
|
+
protected set(key: string, value: any): Promise<void>;
|
10
|
+
protected abstract getStorageKey(key: string): string;
|
11
|
+
}
|
12
|
+
export declare type LastConnection = {
|
13
|
+
name: string;
|
14
|
+
timestamp: number;
|
15
|
+
};
|
16
|
+
export declare class GlobalStorage extends Storage {
|
17
|
+
private static instance;
|
18
|
+
static initialize(context: vscode.ExtensionContext): void;
|
19
|
+
static get(): GlobalStorage;
|
20
|
+
private constructor();
|
21
|
+
protected getStorageKey(key: string): string;
|
22
|
+
getLastConnections(): LastConnection[];
|
23
|
+
setLastConnection(name: string): Promise<void>;
|
24
|
+
setLastConnections(lastConnections: LastConnection[]): Promise<void>;
|
25
|
+
}
|
26
|
+
export declare class ConnectionStorage extends Storage {
|
27
|
+
private connectionName;
|
28
|
+
constructor(context: vscode.ExtensionContext);
|
29
|
+
get ready(): boolean;
|
30
|
+
setConnectionName(connectionName: string): void;
|
31
|
+
protected getStorageKey(key: string): string;
|
10
32
|
getSourceList(): PathContent;
|
11
33
|
setSourceList(sourceList: PathContent): Promise<void>;
|
12
34
|
getLastProfile(): string;
|
@@ -15,4 +37,7 @@ export declare class Storage {
|
|
15
37
|
setPreviousCurLibs(previousCurLibs: string[]): Promise<void>;
|
16
38
|
getDeployment(): DeploymentPath;
|
17
39
|
setDeployment(existingPaths: DeploymentPath): Promise<void>;
|
40
|
+
getDebugCommands(): DebugCommands;
|
41
|
+
setDebugCommands(existingCommands: DebugCommands): Promise<void>;
|
18
42
|
}
|
43
|
+
export {};
|
package/api/Tools.d.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { API } from "./import/git";
|
1
2
|
export declare namespace Tools {
|
2
3
|
interface DB2Headers {
|
3
4
|
name: string;
|
@@ -26,4 +27,5 @@ export declare namespace Tools {
|
|
26
27
|
* @returns the escaped path
|
27
28
|
*/
|
28
29
|
function escapePath(Path: string): string;
|
30
|
+
function getGitAPI(): API | undefined;
|
29
31
|
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import IBMi from "../IBMi";
|
2
|
+
export declare function getKeystorePath(): string;
|
3
|
+
export declare function getLocalCertPath(connection: IBMi): string;
|
4
|
+
export declare function checkRemoteExists(connection: IBMi): Promise<boolean>;
|
5
|
+
export declare function setup(connection: IBMi): Promise<void>;
|
6
|
+
export declare function checkLocalExists(connection: IBMi): Promise<boolean>;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { ExtensionContext } from "vscode";
|
2
|
+
import Instance from "../Instance";
|
3
|
+
export declare function initialize(context: ExtensionContext): Promise<void>;
|
4
|
+
interface DebugOptions {
|
5
|
+
password: string;
|
6
|
+
library: string;
|
7
|
+
object: string;
|
8
|
+
}
|
9
|
+
export declare function startDebug(instance: Instance, options: DebugOptions): Promise<void>;
|
10
|
+
export {};
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import IBMi from "../IBMi";
|
2
|
+
import IBMiContent from "../IBMiContent";
|
3
|
+
export declare function startup(connection: IBMi): Promise<void>;
|
4
|
+
export declare function getRunningJob(localPort: string, content: IBMiContent): Promise<string | undefined>;
|
5
|
+
export declare function end(connection: IBMi): Promise<void>;
|
6
|
+
/**
|
7
|
+
* Gets a list of debug jobs stuck at MSGW in QSYSWRK
|
8
|
+
*/
|
9
|
+
export declare function getStuckJobs(userProfile: string, content: IBMiContent): Promise<string[]>;
|
10
|
+
export declare function endJobs(jobIds: string[], connection: IBMi): Promise<import("../../typings").CommandResult[]>;
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import vscode from 'vscode';
|
2
|
-
import Instance from '../Instance';
|
3
2
|
import { DeploymentParameters } from '../../typings';
|
4
3
|
export declare namespace Deployment {
|
5
|
-
function initialize(context: vscode.ExtensionContext
|
4
|
+
function initialize(context: vscode.ExtensionContext): void;
|
6
5
|
/**
|
7
6
|
* Deploy a workspace to a remote IFS location.
|
8
7
|
* @param workspaceIndex if no index is provided, a prompt will be shown to pick one if there are multiple workspaces,
|
package/extension.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
import { ExtensionContext } from "vscode";
|
2
2
|
import { CodeForIBMi } from "./typings";
|
3
|
-
export declare function activate(context: ExtensionContext): CodeForIBMi
|
3
|
+
export declare function activate(context: ExtensionContext): Promise<CodeForIBMi>;
|
4
4
|
export declare function deactivate(): void;
|
package/instantiate.d.ts
CHANGED
@@ -1,14 +1,7 @@
|
|
1
1
|
import * as vscode from "vscode";
|
2
2
|
import Instance from "./api/Instance";
|
3
|
-
import IBMi from "./api/IBMi";
|
4
3
|
import { Search } from "./api/Search";
|
5
|
-
export declare
|
6
|
-
export declare function setupEmitter(): void;
|
7
|
-
export declare function setConnection(conn: IBMi): void;
|
4
|
+
export declare let instance: Instance;
|
8
5
|
export declare function setSearchResults(term: string, results: Search.Result[]): void;
|
9
6
|
export declare function disconnect(): Promise<boolean>;
|
10
7
|
export declare function loadAllofExtension(context: vscode.ExtensionContext): Promise<void>;
|
11
|
-
/**
|
12
|
-
* Register event
|
13
|
-
*/
|
14
|
-
export declare function on(event: string, func: Function): void;
|
package/package.json
CHANGED
package/typings.d.ts
CHANGED
@@ -10,13 +10,7 @@ export interface CodeForIBMi {
|
|
10
10
|
deploy: (parameters: DeploymentParameters) => Promise<boolean>;
|
11
11
|
evfeventParser: (lines: string[]) => Map<string, FileError[]>;
|
12
12
|
}
|
13
|
-
export declare
|
14
|
-
"all" = 0,
|
15
|
-
"staged" = 1,
|
16
|
-
"unstaged" = 2,
|
17
|
-
"changed" = 3,
|
18
|
-
"compare" = 4
|
19
|
-
}
|
13
|
+
export declare type DeploymentMethod = "all" | "staged" | "unstaged" | "changed" | "compare";
|
20
14
|
export interface DeploymentParameters {
|
21
15
|
method: DeploymentMethod;
|
22
16
|
localFolder: Uri;
|
@@ -112,3 +106,8 @@ export interface FileError {
|
|
112
106
|
text: string;
|
113
107
|
code: string;
|
114
108
|
}
|
109
|
+
export interface QsysFsOptions {
|
110
|
+
filter?: string;
|
111
|
+
readonly?: boolean;
|
112
|
+
}
|
113
|
+
export declare type IBMiEvent = "connected" | "disconnected" | "deployLocation";
|