@halcyontech/vscode-ibmi-types 2.16.2 → 2.17.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/IBMi.d.ts +17 -7
- package/api/IBMiContent.d.ts +5 -5
- package/api/Tools.d.ts +1 -1
- package/api/configuration/config/types.d.ts +3 -0
- package/api/configuration/serverFile.d.ts +23 -0
- package/api/configuration/storage/ConnectionStorage.d.ts +1 -1
- package/api/types.d.ts +4 -0
- package/filesystems/qsys/sourceDateHandler.d.ts +3 -0
- package/package.json +1 -1
- package/typings.d.ts +0 -3
- package/ui/actions.d.ts +17 -0
package/api/IBMi.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import * as node_ssh from "node-ssh";
|
|
3
3
|
import { EventEmitter } from 'stream';
|
|
4
|
-
import { EditorPath } from '../typings';
|
|
5
4
|
import IBMiContent from "./IBMiContent";
|
|
6
5
|
import { Tools } from './Tools';
|
|
7
6
|
import { IBMiComponent } from "./components/component";
|
|
8
7
|
import { ComponentManager, ComponentSearchProps } from "./components/manager";
|
|
9
8
|
import { ConnectionManager } from './configuration/config/ConnectionManager';
|
|
10
|
-
import { ConnectionConfig } from './configuration/config/types';
|
|
9
|
+
import { ConnectionConfig, RemoteConfigFile } from './configuration/config/types';
|
|
10
|
+
import { ConfigFile } from './configuration/serverFile';
|
|
11
11
|
import { CodeForIStorage } from './configuration/storage/CodeForIStorage';
|
|
12
|
-
import { AspInfo, CommandData, CommandResult, ConnectionData, IBMiMember, RemoteCommand } from './types';
|
|
12
|
+
import { AspInfo, CommandData, CommandResult, ConnectionData, EditorPath, IBMiMember, RemoteCommand } from './types';
|
|
13
13
|
export interface MemberParts extends IBMiMember {
|
|
14
14
|
basename: string;
|
|
15
15
|
}
|
|
@@ -17,6 +17,7 @@ export declare type ConnectionMessageType = 'info' | 'warning' | 'error';
|
|
|
17
17
|
export declare type ConnectionErrorCode = `shell_config` | `home_directory_creation` | `QCPTOIMPF_exists` | `QCPFRMIMPF_exists` | `default_not_bash` | `invalid_bashrc` | `invalid_temp_lib` | `no_auto_conv_ebcdic` | `not_loaded_debug_config` | `no_sql_runner` | `ccsid_warning`;
|
|
18
18
|
export interface ConnectionResult {
|
|
19
19
|
success: boolean;
|
|
20
|
+
error?: string;
|
|
20
21
|
errorCodes?: ConnectionErrorCode[];
|
|
21
22
|
}
|
|
22
23
|
declare type DisconnectCallback = (conn: IBMi) => Promise<void>;
|
|
@@ -30,6 +31,15 @@ interface ConnectionCallbacks {
|
|
|
30
31
|
message: (type: ConnectionMessageType, message: string) => void;
|
|
31
32
|
cancelEmitter?: EventEmitter;
|
|
32
33
|
}
|
|
34
|
+
interface ConnectionOptions {
|
|
35
|
+
callbacks: ConnectionCallbacks;
|
|
36
|
+
reconnecting?: boolean;
|
|
37
|
+
reloadServerSettings?: boolean;
|
|
38
|
+
customClient?: node_ssh.NodeSSH;
|
|
39
|
+
}
|
|
40
|
+
interface ConnectionConfigFiles {
|
|
41
|
+
settings: ConfigFile<RemoteConfigFile>;
|
|
42
|
+
}
|
|
33
43
|
export default class IBMi {
|
|
34
44
|
static GlobalStorage: CodeForIStorage;
|
|
35
45
|
static connectionManager: ConnectionManager;
|
|
@@ -44,6 +54,7 @@ export default class IBMi {
|
|
|
44
54
|
private userDefaultCCSID;
|
|
45
55
|
private sshdCcsid;
|
|
46
56
|
private componentManager;
|
|
57
|
+
private configFiles;
|
|
47
58
|
/**
|
|
48
59
|
* @deprecated Will become private in v3.0.0 - use {@link IBMi.getConfig} instead.
|
|
49
60
|
*/
|
|
@@ -89,6 +100,7 @@ export default class IBMi {
|
|
|
89
100
|
* Will only be called once per connection.
|
|
90
101
|
*/
|
|
91
102
|
setDisconnectedCallback(callback: DisconnectCallback): void;
|
|
103
|
+
getConfigFile<T>(id: keyof ConnectionConfigFiles): ConfigFile<T>;
|
|
92
104
|
get canUseCqsh(): boolean;
|
|
93
105
|
/**
|
|
94
106
|
* Primarily used for running SQL statements.
|
|
@@ -106,10 +118,7 @@ export default class IBMi {
|
|
|
106
118
|
getConfig(): ConnectionConfig;
|
|
107
119
|
setConfig(newConfig: ConnectionConfig): void;
|
|
108
120
|
constructor();
|
|
109
|
-
|
|
110
|
-
* @returns {Promise<{success: boolean, error?: any}>} Was succesful at connecting or not.
|
|
111
|
-
*/
|
|
112
|
-
connect(connectionObject: ConnectionData, callbacks: ConnectionCallbacks, reconnecting?: boolean, reloadServerSettings?: boolean): Promise<ConnectionResult>;
|
|
121
|
+
connect(connectionObject: ConnectionData, options: ConnectionOptions): Promise<ConnectionResult>;
|
|
113
122
|
private ensureTempLibraryExists;
|
|
114
123
|
private ensureTempDirectory;
|
|
115
124
|
/**
|
|
@@ -117,6 +126,7 @@ export default class IBMi {
|
|
|
117
126
|
*/
|
|
118
127
|
getSystemVersion(): number;
|
|
119
128
|
usingBash(): boolean;
|
|
129
|
+
loadRemoteConfigs(): Promise<void>;
|
|
120
130
|
/**
|
|
121
131
|
* - Send PASE/QSH/ILE commands simply
|
|
122
132
|
* - Commands sent here end in the 'IBM i Output' channel
|
package/api/IBMiContent.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
/// <reference types="node" />
|
|
3
3
|
import * as node_ssh from "node-ssh";
|
|
4
|
-
import { EditorPath } from '
|
|
4
|
+
import { EditorPath } from './types';
|
|
5
5
|
import { FilterType } from './Filter';
|
|
6
6
|
import { default as IBMi } from './IBMi';
|
|
7
7
|
import { Tools } from './Tools';
|
|
@@ -227,12 +227,12 @@ export default class IBMiContent {
|
|
|
227
227
|
uploadDirectory(localDirectory: EditorPath, remoteDirectory: string, options?: node_ssh.SSHGetPutDirectoryOptions): Promise<boolean>;
|
|
228
228
|
downloadDirectory(localDirectory: EditorPath, remoteDirectory: string, options?: node_ssh.SSHGetPutDirectoryOptions): Promise<boolean>;
|
|
229
229
|
/**
|
|
230
|
-
* Copy one or more folders or files into a directory. Uses
|
|
230
|
+
* Copy one or more folders or files into a directory or file. Uses ILE `CPY` to keep all the attributes of the original file into its copy.
|
|
231
231
|
* @param paths one or more files/folders to copy
|
|
232
|
-
* @param
|
|
233
|
-
* @returns the {@link CommandResult} of the `
|
|
232
|
+
* @param toPath the directory or file where the files/folders will be copied into
|
|
233
|
+
* @returns the {@link CommandResult} of the `CPY` command execution
|
|
234
234
|
*/
|
|
235
|
-
copy(paths: string | string[],
|
|
235
|
+
copy(paths: string | string[], toPath: string): Promise<CommandResult>;
|
|
236
236
|
/**
|
|
237
237
|
* Move one or more folders or files into a directory. Uses QSH's `mv` to ensures attributes are not altered during the opration.
|
|
238
238
|
* @param paths one or more files/folders to copy
|
package/api/Tools.d.ts
CHANGED
|
@@ -33,6 +33,9 @@ export interface ConnectionConfig extends ConnectionProfile {
|
|
|
33
33
|
lastDownloadLocation: string;
|
|
34
34
|
[name: string]: any;
|
|
35
35
|
}
|
|
36
|
+
export interface RemoteConfigFile {
|
|
37
|
+
codefori?: Partial<ConnectionConfig>;
|
|
38
|
+
}
|
|
36
39
|
export interface ObjectFilters {
|
|
37
40
|
name: string;
|
|
38
41
|
filterType: FilterType;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import IBMi from "../IBMi";
|
|
2
|
+
declare type ConfigResult = `not_loaded` | `no_exist` | `failed_to_parse` | `invalid` | `ok`;
|
|
3
|
+
interface LoadResult {
|
|
4
|
+
server: ConfigResult;
|
|
5
|
+
}
|
|
6
|
+
export declare class ConfigFile<T> {
|
|
7
|
+
private connection;
|
|
8
|
+
readonly fallback: T;
|
|
9
|
+
private state;
|
|
10
|
+
private basename;
|
|
11
|
+
private serverFile;
|
|
12
|
+
private serverData;
|
|
13
|
+
validateData: ((loadedConfig: any) => T) | undefined;
|
|
14
|
+
constructor(connection: IBMi, configId: string, fallback: T);
|
|
15
|
+
getPaths(): {
|
|
16
|
+
server: string;
|
|
17
|
+
};
|
|
18
|
+
loadFromServer(): Promise<void>;
|
|
19
|
+
get(): Promise<T>;
|
|
20
|
+
reset(): void;
|
|
21
|
+
getState(): LoadResult;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseStorage } from "./BaseStorage";
|
|
2
|
-
import {
|
|
2
|
+
import { DebugCommands, DeploymentPath, PathContent } from "./CodeForIStorage";
|
|
3
3
|
declare type AuthorisedExtension = {
|
|
4
4
|
id: string;
|
|
5
5
|
displayName: string;
|
package/api/types.d.ts
CHANGED
|
@@ -58,6 +58,7 @@ export interface ConnectionData {
|
|
|
58
58
|
privateKeyPath?: string;
|
|
59
59
|
keepaliveInterval?: number;
|
|
60
60
|
readyTimeout?: number;
|
|
61
|
+
sshDebug?: boolean;
|
|
61
62
|
}
|
|
62
63
|
export interface Server {
|
|
63
64
|
name: string;
|
|
@@ -192,4 +193,7 @@ export interface ModuleExport {
|
|
|
192
193
|
symbolType: string;
|
|
193
194
|
argumentOptimization: string;
|
|
194
195
|
}
|
|
196
|
+
export declare type EditorPath = string | {
|
|
197
|
+
fsPath: string;
|
|
198
|
+
};
|
|
195
199
|
export * from "./configuration/config/types";
|
|
@@ -3,12 +3,14 @@ export declare class SourceDateHandler {
|
|
|
3
3
|
readonly baseDates: Map<string, string[]>;
|
|
4
4
|
readonly baseSource: Map<string, string>;
|
|
5
5
|
readonly recordLengths: Map<string, number>;
|
|
6
|
+
readonly baseSequences: Map<string, number[]>;
|
|
6
7
|
private enabled;
|
|
7
8
|
private timeout?;
|
|
8
9
|
private readonly timeoutDelay;
|
|
9
10
|
private highlightSince?;
|
|
10
11
|
private highlightBefore?;
|
|
11
12
|
private lineEditedBefore?;
|
|
13
|
+
private sequenceNumbersShowing;
|
|
12
14
|
private readonly sourceDateSearchBarItem;
|
|
13
15
|
constructor(context: vscode.ExtensionContext);
|
|
14
16
|
setEnabled(enabled: boolean): void;
|
|
@@ -20,6 +22,7 @@ export declare class SourceDateHandler {
|
|
|
20
22
|
private _diffRefreshGutter;
|
|
21
23
|
calcNewSourceDates(alias: string, body: string): string[];
|
|
22
24
|
private toggleSourceDateGutter;
|
|
25
|
+
private toggleSequenceNumbers;
|
|
23
26
|
private clearDateSearch;
|
|
24
27
|
private newDateSearch;
|
|
25
28
|
}
|
package/package.json
CHANGED
package/typings.d.ts
CHANGED
package/ui/actions.d.ts
CHANGED
|
@@ -2,5 +2,22 @@ import vscode, { WorkspaceFolder } from 'vscode';
|
|
|
2
2
|
import Instance from '../Instance';
|
|
3
3
|
import { Action, DeploymentMethod } from '../typings';
|
|
4
4
|
import { BrowserItem } from './types';
|
|
5
|
+
export declare type ActionTarget = {
|
|
6
|
+
uri: vscode.Uri;
|
|
7
|
+
extension: string;
|
|
8
|
+
fragment: string;
|
|
9
|
+
protected: boolean;
|
|
10
|
+
workspaceFolder?: vscode.WorkspaceFolder;
|
|
11
|
+
executionOK: boolean;
|
|
12
|
+
hasRun: boolean;
|
|
13
|
+
processed: boolean;
|
|
14
|
+
output: string[];
|
|
15
|
+
};
|
|
5
16
|
export declare function registerActionTools(context: vscode.ExtensionContext): void;
|
|
17
|
+
export declare function uriToActionTarget(uri: vscode.Uri, workspaceFolder?: WorkspaceFolder): ActionTarget;
|
|
6
18
|
export declare function runAction(instance: Instance, uris: vscode.Uri | vscode.Uri[], customAction?: Action, method?: DeploymentMethod, browserItems?: BrowserItem[], workspaceFolder?: WorkspaceFolder): Promise<boolean>;
|
|
19
|
+
export declare type AvailableAction = {
|
|
20
|
+
label: string;
|
|
21
|
+
action: Action;
|
|
22
|
+
};
|
|
23
|
+
export declare function getAllAvailableActions(targets: ActionTarget[], scheme: string): Promise<AvailableAction[]>;
|