@halcyontech/vscode-ibmi-types 2.1.1 → 2.3.0
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/CompileTools.d.ts +3 -3
- package/api/Configuration.d.ts +3 -2
- package/api/CustomUI.d.ts +7 -1
- package/api/IBMiContent.d.ts +2 -1
- package/api/Search.d.ts +1 -1
- package/api/Storage.d.ts +2 -0
- package/api/Tools.d.ts +1 -0
- package/api/errors/handler.d.ts +29 -0
- package/api/errors/handlers/new.d.ts +9 -0
- package/api/errors/handlers/old.d.ts +9 -0
- package/package.json +1 -1
- package/typings.d.ts +42 -10
package/api/CompileTools.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import vscode from 'vscode';
|
1
|
+
import vscode, { EventEmitter } from 'vscode';
|
2
2
|
import { Action, CommandResult, DeploymentMethod, RemoteCommand } from '../typings';
|
3
3
|
import Instance from './Instance';
|
4
4
|
export interface ILELibrarySettings {
|
@@ -7,9 +7,9 @@ export interface ILELibrarySettings {
|
|
7
7
|
}
|
8
8
|
export declare namespace CompileTools {
|
9
9
|
function register(context: vscode.ExtensionContext): void;
|
10
|
-
function runAction(instance: Instance, uri: vscode.Uri, customAction?: Action, method?: DeploymentMethod): Promise<
|
10
|
+
function runAction(instance: Instance, uri: vscode.Uri, customAction?: Action, method?: DeploymentMethod): Promise<boolean>;
|
11
11
|
/**
|
12
12
|
* Execute a command
|
13
13
|
*/
|
14
|
-
function runCommand(instance: Instance, options: RemoteCommand,
|
14
|
+
function runCommand(instance: Instance, options: RemoteCommand, writeEvent?: EventEmitter<string>): Promise<CommandResult | null>;
|
15
15
|
}
|
package/api/Configuration.d.ts
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
-
|
1
|
+
import * as vscode from 'vscode';
|
2
2
|
export declare type SourceDateMode = "edit" | "diff";
|
3
|
+
export declare function onCodeForIBMiConfigurationChange<T>(props: string | string[], todo: (value: vscode.ConfigurationChangeEvent) => void): vscode.Disposable;
|
3
4
|
export declare namespace GlobalConfiguration {
|
4
|
-
function get<T>(
|
5
|
+
function get<T>(key: string): T | undefined;
|
5
6
|
function set(key: string, value: any): Thenable<void>;
|
6
7
|
}
|
7
8
|
export declare namespace ConnectionConfiguration {
|
package/api/CustomUI.d.ts
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
import vscode from 'vscode';
|
2
|
+
declare type PanelOptions = {
|
3
|
+
fullWidth?: boolean;
|
4
|
+
};
|
2
5
|
export interface Page<T> {
|
3
6
|
panel: vscode.WebviewPanel;
|
4
7
|
data?: T;
|
@@ -42,10 +45,11 @@ export declare class Section {
|
|
42
45
|
addComplexTabs(tabs: ComplexTab[], selected?: number): this;
|
43
46
|
addSelect(id: string, label: string, items: SelectItem[], description?: string): this;
|
44
47
|
addTree(id: string, label: string, treeItems: TreeListItem[], description?: string): this;
|
45
|
-
addButtons(...buttons: Button[]): this;
|
48
|
+
addButtons(...buttons: (Button | undefined)[]): this;
|
46
49
|
addField(field: Field): this;
|
47
50
|
}
|
48
51
|
export declare class CustomUI extends Section {
|
52
|
+
private options?;
|
49
53
|
/**
|
50
54
|
* If no callback is provided, a Promise will be returned.
|
51
55
|
* If the page is already opened, it grabs the focus and return no Promise (as it's alreay handled by the first call).
|
@@ -55,6 +59,7 @@ export declare class CustomUI extends Section {
|
|
55
59
|
* @returns a Promise<Page<T>> if no callback is provided
|
56
60
|
*/
|
57
61
|
loadPage<T>(title: string, callback?: (page: Page<T>) => void): Promise<Page<T>> | undefined;
|
62
|
+
setOptions(options: PanelOptions): this;
|
58
63
|
private createPage;
|
59
64
|
private getHTML;
|
60
65
|
}
|
@@ -101,3 +106,4 @@ export declare class Field {
|
|
101
106
|
private renderLabel;
|
102
107
|
private renderDescription;
|
103
108
|
}
|
109
|
+
export {};
|
package/api/IBMiContent.d.ts
CHANGED
@@ -2,6 +2,7 @@ import { IBMiError, IBMiFile, IBMiMember, IBMiObject, IFSFile, QsysPath } from '
|
|
2
2
|
import { default as IBMi } from './IBMi';
|
3
3
|
import { Tools } from './Tools';
|
4
4
|
declare type Authority = "*ADD" | "*DLT" | "*EXECUTE" | "*READ" | "*UPD" | "*NONE" | "*ALL" | "*CHANGE" | "*USE" | "*EXCLUDE" | "*AUTLMGT";
|
5
|
+
export declare type SortOrder = `name` | `type`;
|
5
6
|
export declare type SortOptions = {
|
6
7
|
order: "name" | "date" | "?";
|
7
8
|
ascending?: boolean;
|
@@ -65,7 +66,7 @@ export default class IBMiContent {
|
|
65
66
|
library: string;
|
66
67
|
object?: string;
|
67
68
|
types?: string[];
|
68
|
-
}, sortOrder?:
|
69
|
+
}, sortOrder?: SortOrder): Promise<IBMiFile[]>;
|
69
70
|
/**
|
70
71
|
* @param lib
|
71
72
|
* @param spf
|
package/api/Search.d.ts
CHANGED
@@ -10,6 +10,6 @@ export declare namespace Search {
|
|
10
10
|
number: number;
|
11
11
|
content: string;
|
12
12
|
}
|
13
|
-
function searchMembers(instance: Instance, library: string, sourceFile: string, memberFilter: string, searchTerm: string,
|
13
|
+
function searchMembers(instance: Instance, library: string, sourceFile: string, memberFilter: string, searchTerm: string, readOnly?: boolean): Promise<Result[]>;
|
14
14
|
function searchIFS(instance: Instance, path: string, searchTerm: string): Promise<Result[]>;
|
15
15
|
}
|
package/api/Storage.d.ts
CHANGED
@@ -56,6 +56,8 @@ export declare class GlobalStorage extends Storage {
|
|
56
56
|
};
|
57
57
|
setServerSettingsCache(name: string, serverSettings: CachedServerSettings): Promise<void>;
|
58
58
|
deleteServerSettingsCache(name: string): Promise<void>;
|
59
|
+
getPreviousSearchTerms(): string[];
|
60
|
+
setPreviousSearchTerms(previousSearchTerms: string[]): Promise<void>;
|
59
61
|
}
|
60
62
|
export declare class ConnectionStorage extends Storage {
|
61
63
|
private connectionName;
|
package/api/Tools.d.ts
CHANGED
@@ -0,0 +1,29 @@
|
|
1
|
+
import { FileError } from "../../typings";
|
2
|
+
export declare enum RecordType {
|
3
|
+
TIMESTAMP = "TIMESTAMP",
|
4
|
+
PROCESSOR = "PROCESSOR",
|
5
|
+
FILE_ID = "FILEID",
|
6
|
+
FILE_ID_CONT = "FILEIDCONT",
|
7
|
+
FILE_END = "FILEEND",
|
8
|
+
ERROR_INFORMATION = "ERROR",
|
9
|
+
EXPANSION = "EXPANSION",
|
10
|
+
PROGRAM = "PROGRAM",
|
11
|
+
MAP_DEFINE = "MAPDEFINE",
|
12
|
+
MAP_START = "MAPSTART",
|
13
|
+
MAP_END = "MAPEND",
|
14
|
+
FEEDBACK_CODE = "FEEDBACK"
|
15
|
+
}
|
16
|
+
export interface FileId {
|
17
|
+
version: number;
|
18
|
+
sourceId: number;
|
19
|
+
line: number;
|
20
|
+
length: number;
|
21
|
+
filename: string;
|
22
|
+
sourcefileTimestamp: number;
|
23
|
+
tempFlag: number;
|
24
|
+
}
|
25
|
+
export declare function formatName(input: string): string;
|
26
|
+
export declare function formatIFS(path: string): string;
|
27
|
+
export declare function parseErrors(lines: string[]): Map<string, FileError[]>;
|
28
|
+
export declare function getLinesByRecodType(lines: string[], recordType: RecordType, sourceFileId?: number): string[];
|
29
|
+
export declare function getSourcePath(lines: string[], fileId: number): string;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { FileError } from '../../../typings';
|
2
|
+
export declare namespace NewHandler {
|
3
|
+
/**
|
4
|
+
* Returns object of files and their errors
|
5
|
+
* @param lines file contents
|
6
|
+
* @returns Errors object
|
7
|
+
*/
|
8
|
+
function parse(lines: string[]): Map<string, FileError[]>;
|
9
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { FileError } from '../../../typings';
|
2
|
+
export declare namespace OldHandler {
|
3
|
+
/**
|
4
|
+
* Returns object of files and their errors
|
5
|
+
* @param lines file contents
|
6
|
+
* @returns Errors object
|
7
|
+
*/
|
8
|
+
function parse(lines: string[]): Map<string, FileError[]>;
|
9
|
+
}
|
package/package.json
CHANGED
package/typings.d.ts
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
/// <reference types="node" />
|
2
|
-
import { WorkspaceFolder } from "vscode";
|
3
|
-
import Instance from "./api/Instance";
|
4
2
|
import { Ignore } from 'ignore';
|
3
|
+
import { ProviderResult, TreeItem, TreeItemCollapsibleState, WorkspaceFolder } from "vscode";
|
4
|
+
import { ConnectionConfiguration } from './api/Configuration';
|
5
5
|
import { CustomUI } from "./api/CustomUI";
|
6
|
+
import Instance from "./api/Instance";
|
6
7
|
import { Tools } from "./api/Tools";
|
7
8
|
import { DeployTools } from "./api/local/deployTools";
|
8
9
|
export interface CodeForIBMi {
|
@@ -28,6 +29,7 @@ export interface StandardIO {
|
|
28
29
|
* External interface for extensions to call `code-for-ibmi.runCommand`
|
29
30
|
*/
|
30
31
|
export interface RemoteCommand {
|
32
|
+
title?: string;
|
31
33
|
command: string;
|
32
34
|
environment?: "ile" | "qsh" | "pase";
|
33
35
|
cwd?: string;
|
@@ -44,11 +46,13 @@ export interface CommandResult {
|
|
44
46
|
stderr: string;
|
45
47
|
command?: string;
|
46
48
|
}
|
49
|
+
export declare type ActionType = "member" | "streamfile" | "object" | "file";
|
50
|
+
export declare type ActionEnvironment = "ile" | "qsh" | "pase";
|
47
51
|
export interface Action {
|
48
52
|
name: string;
|
49
53
|
command: string;
|
50
|
-
type?:
|
51
|
-
environment:
|
54
|
+
type?: ActionType;
|
55
|
+
environment: ActionEnvironment;
|
52
56
|
extensions?: string[];
|
53
57
|
deployFirst?: boolean;
|
54
58
|
postDownload?: string[];
|
@@ -59,7 +63,7 @@ export interface ConnectionData {
|
|
59
63
|
port: number;
|
60
64
|
username: string;
|
61
65
|
password?: string;
|
62
|
-
|
66
|
+
privateKeyPath?: string;
|
63
67
|
keepaliveInterval?: number;
|
64
68
|
}
|
65
69
|
export interface Server {
|
@@ -104,10 +108,6 @@ export interface IBMiError {
|
|
104
108
|
code: string;
|
105
109
|
text: string;
|
106
110
|
}
|
107
|
-
export interface Filter {
|
108
|
-
library: string;
|
109
|
-
filter: string;
|
110
|
-
}
|
111
111
|
export interface FileError {
|
112
112
|
sev: number;
|
113
113
|
lineNum: number;
|
@@ -121,6 +121,38 @@ export interface QsysFsOptions {
|
|
121
121
|
readonly?: boolean;
|
122
122
|
}
|
123
123
|
export declare type IBMiEvent = "connected" | "disconnected" | "deployLocation" | "deploy";
|
124
|
-
export interface
|
124
|
+
export interface WithPath {
|
125
125
|
path: string;
|
126
126
|
}
|
127
|
+
export interface Library extends WithPath {
|
128
|
+
}
|
129
|
+
export declare type FocusOptions = {
|
130
|
+
select?: boolean;
|
131
|
+
focus?: boolean;
|
132
|
+
expand?: boolean | number;
|
133
|
+
};
|
134
|
+
export declare type BrowserItemParameters = {
|
135
|
+
icon?: string;
|
136
|
+
state?: TreeItemCollapsibleState;
|
137
|
+
parent?: BrowserItem;
|
138
|
+
};
|
139
|
+
export declare class BrowserItem extends TreeItem {
|
140
|
+
readonly params?: BrowserItemParameters;
|
141
|
+
constructor(label: string, params?: BrowserItemParameters);
|
142
|
+
get parent(): BrowserItem;
|
143
|
+
getChildren?(): ProviderResult<BrowserItem[]>;
|
144
|
+
refresh?(): void;
|
145
|
+
reveal?(options?: FocusOptions): Thenable<void>;
|
146
|
+
}
|
147
|
+
export interface FilteredItem {
|
148
|
+
filter: ConnectionConfiguration.ObjectFilters;
|
149
|
+
}
|
150
|
+
export interface ObjectItem extends FilteredItem, WithPath {
|
151
|
+
object: IBMiObject;
|
152
|
+
}
|
153
|
+
export interface SourcePhysicalFileItem extends FilteredItem, WithPath {
|
154
|
+
sourceFile: IBMiFile;
|
155
|
+
}
|
156
|
+
export interface MemberItem extends FilteredItem, WithPath {
|
157
|
+
member: IBMiMember;
|
158
|
+
}
|