@halcyontech/vscode-ibmi-types 1.9.1 → 2.1.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 +4 -17
- package/api/Configuration.d.ts +1 -0
- package/api/CustomUI.d.ts +8 -1
- package/api/IBMiContent.d.ts +10 -3
- package/api/Storage.d.ts +2 -0
- package/api/Tools.d.ts +3 -1
- package/api/debug/certificates.d.ts +1 -1
- package/api/errors/diagnostics.d.ts +17 -0
- package/api/errors/handler.d.ts +25 -0
- package/api/errors/parser.d.ts +2 -0
- package/api/local/LocalLanguageActions.d.ts +2 -0
- package/api/local/actions.d.ts +1 -4
- package/api/local/deployTools.d.ts +24 -0
- package/api/local/deployment.d.ts +20 -8
- package/extension.d.ts +1 -1
- package/locale/ids/da.d.ts +2 -0
- package/locale/ids/en.d.ts +2 -0
- package/locale/ids/fr.d.ts +2 -0
- package/locale/index.d.ts +5 -0
- package/package.json +1 -1
- package/typings.d.ts +7 -3
package/api/CompileTools.d.ts
CHANGED
@@ -1,28 +1,15 @@
|
|
1
1
|
import vscode from 'vscode';
|
2
|
-
import { CommandResult, RemoteCommand } from '../typings';
|
2
|
+
import { Action, CommandResult, DeploymentMethod, RemoteCommand } from '../typings';
|
3
3
|
import Instance from './Instance';
|
4
4
|
export interface ILELibrarySettings {
|
5
5
|
currentLibrary: string;
|
6
6
|
libraryList: string[];
|
7
7
|
}
|
8
8
|
export declare namespace CompileTools {
|
9
|
-
|
10
|
-
|
11
|
-
library: string;
|
12
|
-
object: string;
|
13
|
-
extension?: string;
|
14
|
-
workspace?: number;
|
15
|
-
}
|
16
|
-
export function register(context: vscode.ExtensionContext): void;
|
17
|
-
/**
|
18
|
-
* Does what it says on the tin.
|
19
|
-
*/
|
20
|
-
export function clearDiagnostics(): void;
|
21
|
-
export function refreshDiagnostics(instance: Instance, evfeventInfo: EvfEventInfo): Promise<void>;
|
22
|
-
export function runAction(instance: Instance, uri: vscode.Uri): Promise<void>;
|
9
|
+
function register(context: vscode.ExtensionContext): void;
|
10
|
+
function runAction(instance: Instance, uri: vscode.Uri, customAction?: Action, method?: DeploymentMethod): Promise<void>;
|
23
11
|
/**
|
24
12
|
* Execute a command
|
25
13
|
*/
|
26
|
-
|
27
|
-
export {};
|
14
|
+
function runCommand(instance: Instance, options: RemoteCommand, title?: string): Promise<CommandResult | null>;
|
28
15
|
}
|
package/api/Configuration.d.ts
CHANGED
@@ -27,6 +27,7 @@ export declare namespace ConnectionConfiguration {
|
|
27
27
|
connectringStringFor5250: string;
|
28
28
|
autoSaveBeforeAction: boolean;
|
29
29
|
showDescInLibList: boolean;
|
30
|
+
debugCertDirectory: string;
|
30
31
|
debugPort: string;
|
31
32
|
debugIsSecure: boolean;
|
32
33
|
debugUpdateProductionFiles: boolean;
|
package/api/CustomUI.d.ts
CHANGED
@@ -6,6 +6,7 @@ export interface Page<T> {
|
|
6
6
|
export interface Button {
|
7
7
|
id: string;
|
8
8
|
label: string;
|
9
|
+
requiresValidation?: boolean;
|
9
10
|
}
|
10
11
|
export interface SelectItem {
|
11
12
|
text: string;
|
@@ -30,6 +31,9 @@ export declare class Section {
|
|
30
31
|
default?: string;
|
31
32
|
readonly?: boolean;
|
32
33
|
rows?: number;
|
34
|
+
minlength?: number;
|
35
|
+
maxlength?: number;
|
36
|
+
regexTest?: string;
|
33
37
|
}): this;
|
34
38
|
addParagraph(label: string): this;
|
35
39
|
addFile(id: string, label: string, description?: string): this;
|
@@ -54,7 +58,7 @@ export declare class CustomUI extends Section {
|
|
54
58
|
private createPage;
|
55
59
|
private getHTML;
|
56
60
|
}
|
57
|
-
export declare type FieldType = "input" | "password" | "
|
61
|
+
export declare type FieldType = "input" | "password" | "buttons" | "checkbox" | "file" | "complexTabs" | "tabs" | "tree" | "select" | "paragraph" | "hr" | "heading";
|
58
62
|
export interface TreeListItemIcon {
|
59
63
|
branch?: string;
|
60
64
|
open?: string;
|
@@ -89,6 +93,9 @@ export declare class Field {
|
|
89
93
|
default?: string;
|
90
94
|
readonly?: boolean;
|
91
95
|
rows?: number;
|
96
|
+
minlength?: number;
|
97
|
+
maxlength?: number;
|
98
|
+
regexTest?: string;
|
92
99
|
constructor(type: FieldType, id: string, label: string, description?: string);
|
93
100
|
getHTML(): string;
|
94
101
|
private renderLabel;
|
package/api/IBMiContent.d.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import { IBMiError, IBMiFile, IBMiMember, IBMiObject, IFSFile, QsysPath } from '../typings';
|
2
2
|
import { default as IBMi } from './IBMi';
|
3
3
|
import { Tools } from './Tools';
|
4
|
+
declare type Authority = "*ADD" | "*DLT" | "*EXECUTE" | "*READ" | "*UPD" | "*NONE" | "*ALL" | "*CHANGE" | "*USE" | "*EXCLUDE" | "*AUTLMGT";
|
4
5
|
export declare type SortOptions = {
|
5
6
|
order: "name" | "date" | "?";
|
6
7
|
ascending?: boolean;
|
@@ -17,7 +18,7 @@ export default class IBMiContent {
|
|
17
18
|
/**
|
18
19
|
* Download the contents of a source member
|
19
20
|
*/
|
20
|
-
downloadMemberContent(asp: string | undefined, library: string, sourceFile: string, member: string): Promise<string>;
|
21
|
+
downloadMemberContent(asp: string | undefined, library: string, sourceFile: string, member: string, localPath?: string): Promise<string>;
|
21
22
|
/**
|
22
23
|
* Upload to a member
|
23
24
|
*/
|
@@ -77,10 +78,10 @@ export default class IBMiContent {
|
|
77
78
|
* @param remotePath
|
78
79
|
* @return an array of IFSFile
|
79
80
|
*/
|
80
|
-
getFileList(remotePath: string, sort?: SortOptions): Promise<IFSFile[]>;
|
81
|
+
getFileList(remotePath: string, sort?: SortOptions, onListError?: (errors: string[]) => void): Promise<IFSFile[]>;
|
81
82
|
memberResolve(member: string, files: QsysPath[]): Promise<IBMiMember | undefined>;
|
82
83
|
objectResolve(object: string, libraries: string[]): Promise<string | undefined>;
|
83
|
-
streamfileResolve(
|
84
|
+
streamfileResolve(names: string[], directories: string[]): Promise<string | undefined>;
|
84
85
|
/**
|
85
86
|
* Fix Comments in an SQL string so that the comments always start at position 0 of the line.
|
86
87
|
* Required to work with QZDFMDB2.
|
@@ -106,4 +107,10 @@ export default class IBMiContent {
|
|
106
107
|
* @param remotePath: a remote IFS path
|
107
108
|
*/
|
108
109
|
isDirectory(remotePath: string): Promise<boolean>;
|
110
|
+
checkObject(object: {
|
111
|
+
library: string;
|
112
|
+
name: string;
|
113
|
+
type: string;
|
114
|
+
}, ...authorities: Authority[]): Promise<boolean>;
|
109
115
|
}
|
116
|
+
export {};
|
package/api/Storage.d.ts
CHANGED
@@ -27,6 +27,7 @@ export declare type CachedServerSettings = {
|
|
27
27
|
local: string;
|
28
28
|
};
|
29
29
|
badDataAreasChecked: boolean | null;
|
30
|
+
libraryListValidated: boolean | null;
|
30
31
|
} | undefined;
|
31
32
|
export declare class GlobalStorage extends Storage {
|
32
33
|
private static instance;
|
@@ -51,6 +52,7 @@ export declare class GlobalStorage extends Storage {
|
|
51
52
|
local: string;
|
52
53
|
};
|
53
54
|
badDataAreasChecked: boolean;
|
55
|
+
libraryListValidated: boolean;
|
54
56
|
};
|
55
57
|
setServerSettingsCache(name: string, serverSettings: CachedServerSettings): Promise<void>;
|
56
58
|
deleteServerSettingsCache(name: string): Promise<void>;
|
package/api/Tools.d.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import vscode from "vscode";
|
1
2
|
import { API } from "./import/git";
|
2
3
|
export declare namespace Tools {
|
3
4
|
class SqlError extends Error {
|
@@ -17,7 +18,7 @@ export declare namespace Tools {
|
|
17
18
|
* @returns rows
|
18
19
|
*/
|
19
20
|
function db2Parse(output: string): DB2Row[];
|
20
|
-
function makeid(): string;
|
21
|
+
function makeid(length?: number): string;
|
21
22
|
/**
|
22
23
|
* Build the IFS path string to a member
|
23
24
|
* @param library
|
@@ -37,4 +38,5 @@ export declare namespace Tools {
|
|
37
38
|
function escapePath(Path: string): string;
|
38
39
|
function getGitAPI(): API | undefined;
|
39
40
|
function distinct(value: any, index: number, array: any[]): boolean;
|
41
|
+
function md5Hash(file: vscode.Uri): string;
|
40
42
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import IBMi from "../IBMi";
|
2
|
-
export declare function getKeystorePath(): string;
|
2
|
+
export declare function getKeystorePath(connection: IBMi): string;
|
3
3
|
export declare function getLocalCertPath(connection: IBMi): string;
|
4
4
|
export declare function checkRemoteExists(connection: IBMi): Promise<boolean>;
|
5
5
|
export declare function setup(connection: IBMi): Promise<void>;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import * as vscode from "vscode";
|
2
|
+
import Instance from "../Instance";
|
3
|
+
export interface EvfEventInfo {
|
4
|
+
asp?: string;
|
5
|
+
library: string;
|
6
|
+
object: string;
|
7
|
+
extension?: string;
|
8
|
+
workspace?: vscode.WorkspaceFolder;
|
9
|
+
}
|
10
|
+
export declare function registerDiagnostics(): vscode.Disposable[];
|
11
|
+
/**
|
12
|
+
* Does what it says on the tin.
|
13
|
+
*/
|
14
|
+
export declare function clearDiagnostics(): void;
|
15
|
+
export declare function refreshDiagnosticsFromServer(instance: Instance, evfeventInfo: EvfEventInfo): Promise<void>;
|
16
|
+
export declare function refreshDiagnosticsFromLocal(instance: Instance, evfeventInfo: EvfEventInfo): Promise<void>;
|
17
|
+
export declare function handleEvfeventLines(lines: string[], instance: Instance, evfeventInfo: EvfEventInfo): Promise<void>;
|
package/api/errors/handler.d.ts
CHANGED
@@ -1,4 +1,29 @@
|
|
1
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
|
+
}
|
2
25
|
export declare function formatName(input: string): string;
|
3
26
|
export declare function formatIFS(path: string): string;
|
4
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;
|
package/api/local/actions.d.ts
CHANGED
@@ -1,7 +1,4 @@
|
|
1
1
|
import { WorkspaceFolder } from "vscode";
|
2
2
|
import { Action } from "../../typings";
|
3
3
|
export declare function getLocalActions(currentWorkspace: WorkspaceFolder): Promise<Action[]>;
|
4
|
-
|
5
|
-
* Gets actions from the `iproj.json` file
|
6
|
-
*/
|
7
|
-
export declare function getiProjActions(currentWorkspace: WorkspaceFolder): Promise<Action[]>;
|
4
|
+
export declare function getEvfeventFiles(currentWorkspace: WorkspaceFolder): Promise<import("vscode").Uri[]>;
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { Ignore } from 'ignore';
|
2
|
+
import vscode, { WorkspaceFolder } from 'vscode';
|
3
|
+
import { DeploymentMethod, DeploymentParameters } from '../../typings';
|
4
|
+
export declare namespace DeployTools {
|
5
|
+
function launchActionsSetup(workspaceFolder?: WorkspaceFolder): Promise<void>;
|
6
|
+
/**
|
7
|
+
* Deploy a workspace to a remote IFS location.
|
8
|
+
* @param workspaceIndex if no index is provided, a prompt will be shown to pick one if there are multiple workspaces,
|
9
|
+
* otherwise the current workspace will be used.
|
10
|
+
* @param method if no method is provided, a prompt will be shown to pick the deployment method.
|
11
|
+
* @returns the index of the deployed workspace or `undefined` if the deployment failed
|
12
|
+
*/
|
13
|
+
function launchDeploy(workspaceIndex?: number, method?: DeploymentMethod): Promise<number | undefined>;
|
14
|
+
function deploy(parameters: DeploymentParameters): Promise<boolean>;
|
15
|
+
function getDeployChangedFiles(parameters: DeploymentParameters): Promise<vscode.Uri[]>;
|
16
|
+
function getDeployGitFiles(parameters: DeploymentParameters, changeType: 'staged' | 'working'): Promise<vscode.Uri[]>;
|
17
|
+
function getDeployCompareFiles(parameters: DeploymentParameters, progress?: vscode.Progress<{
|
18
|
+
message?: string;
|
19
|
+
}>): Promise<vscode.Uri[]>;
|
20
|
+
function getDeployAllFiles(parameters: DeploymentParameters): Promise<vscode.Uri[]>;
|
21
|
+
function setDeployLocation(node: any, workspaceFolder?: WorkspaceFolder, value?: string): Promise<void>;
|
22
|
+
function buildPossibleDeploymentDirectory(workspace: vscode.WorkspaceFolder): string;
|
23
|
+
function getDefaultIgnoreRules(workspaceFolder: vscode.WorkspaceFolder): Promise<Ignore>;
|
24
|
+
}
|
@@ -1,13 +1,25 @@
|
|
1
1
|
import vscode from 'vscode';
|
2
2
|
import { DeploymentParameters } from '../../typings';
|
3
|
+
import IBMi from '../IBMi';
|
3
4
|
export declare namespace Deployment {
|
5
|
+
interface MD5Entry {
|
6
|
+
path: string;
|
7
|
+
md5: string;
|
8
|
+
}
|
9
|
+
const BUTTON_BASE = "$(cloud-upload) Deploy";
|
10
|
+
const BUTTON_WORKING = "$(sync~spin) Deploying";
|
11
|
+
const deploymentLog: vscode.OutputChannel;
|
12
|
+
const button: vscode.StatusBarItem;
|
13
|
+
const workspaceChanges: Map<vscode.WorkspaceFolder, Map<string, vscode.Uri>>;
|
4
14
|
function initialize(context: vscode.ExtensionContext): void;
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
function
|
12
|
-
function
|
15
|
+
function getConnection(): IBMi;
|
16
|
+
function createRemoteDirectory(remotePath: string): Promise<import("../../typings").CommandResult>;
|
17
|
+
function showErrorButton(): Promise<void>;
|
18
|
+
function getWorkspaceFolder(workspaceIndex?: number): Promise<vscode.WorkspaceFolder>;
|
19
|
+
function toMD5Entry(line: string): MD5Entry;
|
20
|
+
function toRelative(root: vscode.Uri, file: vscode.Uri): string;
|
21
|
+
function findFiles(parameters: DeploymentParameters, includePattern: string, excludePattern?: string): Promise<vscode.Uri[]>;
|
22
|
+
function sendCompressed(parameters: DeploymentParameters, files: vscode.Uri[], progress: vscode.Progress<{
|
23
|
+
message?: string;
|
24
|
+
}>): Promise<void>;
|
13
25
|
}
|
package/extension.d.ts
CHANGED
package/package.json
CHANGED
package/typings.d.ts
CHANGED
@@ -3,11 +3,14 @@ import { WorkspaceFolder } from "vscode";
|
|
3
3
|
import Instance from "./api/Instance";
|
4
4
|
import { Ignore } from 'ignore';
|
5
5
|
import { CustomUI } from "./api/CustomUI";
|
6
|
+
import { Tools } from "./api/Tools";
|
7
|
+
import { DeployTools } from "./api/local/deployTools";
|
6
8
|
export interface CodeForIBMi {
|
7
9
|
instance: Instance;
|
8
10
|
customUI: () => CustomUI;
|
9
|
-
|
11
|
+
deployTools: typeof DeployTools;
|
10
12
|
evfeventParser: (lines: string[]) => Map<string, FileError[]>;
|
13
|
+
tools: typeof Tools;
|
11
14
|
}
|
12
15
|
export declare type DeploymentMethod = "all" | "staged" | "unstaged" | "changed" | "compare";
|
13
16
|
export interface DeploymentParameters {
|
@@ -46,7 +49,7 @@ export interface Action {
|
|
46
49
|
command: string;
|
47
50
|
type?: "member" | "streamfile" | "object" | "file";
|
48
51
|
environment: "ile" | "qsh" | "pase";
|
49
|
-
extensions
|
52
|
+
extensions?: string[];
|
50
53
|
deployFirst?: boolean;
|
51
54
|
postDownload?: string[];
|
52
55
|
}
|
@@ -107,7 +110,8 @@ export interface Filter {
|
|
107
110
|
}
|
108
111
|
export interface FileError {
|
109
112
|
sev: number;
|
110
|
-
|
113
|
+
lineNum: number;
|
114
|
+
toLineNum: number;
|
111
115
|
column: number;
|
112
116
|
toColumn: number;
|
113
117
|
text: string;
|