@halcyontech/vscode-ibmi-types 2.16.3 → 2.17.2

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 CHANGED
@@ -1,16 +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
9
  import { ConnectionConfig, RemoteConfigFile } from './configuration/config/types';
11
- import { CodeForIStorage } from './configuration/storage/CodeForIStorage';
12
- import { AspInfo, CommandData, CommandResult, ConnectionData, IBMiMember, RemoteCommand } from './types';
13
10
  import { ConfigFile } from './configuration/serverFile';
11
+ import { CodeForIStorage } from './configuration/storage/CodeForIStorage';
12
+ import { AspInfo, CommandData, CommandResult, ConnectionData, EditorPath, IBMiMember, RemoteCommand } from './types';
14
13
  export interface MemberParts extends IBMiMember {
15
14
  basename: string;
16
15
  }
@@ -18,6 +17,7 @@ export declare type ConnectionMessageType = 'info' | 'warning' | 'error';
18
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`;
19
18
  export interface ConnectionResult {
20
19
  success: boolean;
20
+ error?: string;
21
21
  errorCodes?: ConnectionErrorCode[];
22
22
  }
23
23
  declare type DisconnectCallback = (conn: IBMi) => Promise<void>;
@@ -31,6 +31,12 @@ interface ConnectionCallbacks {
31
31
  message: (type: ConnectionMessageType, message: string) => void;
32
32
  cancelEmitter?: EventEmitter;
33
33
  }
34
+ interface ConnectionOptions {
35
+ callbacks: ConnectionCallbacks;
36
+ reconnecting?: boolean;
37
+ reloadServerSettings?: boolean;
38
+ customClient?: node_ssh.NodeSSH;
39
+ }
34
40
  interface ConnectionConfigFiles {
35
41
  settings: ConfigFile<RemoteConfigFile>;
36
42
  }
@@ -112,10 +118,7 @@ export default class IBMi {
112
118
  getConfig(): ConnectionConfig;
113
119
  setConfig(newConfig: ConnectionConfig): void;
114
120
  constructor();
115
- /**
116
- * @returns {Promise<{success: boolean, error?: any}>} Was succesful at connecting or not.
117
- */
118
- connect(connectionObject: ConnectionData, callbacks: ConnectionCallbacks, reconnecting?: boolean, reloadServerSettings?: boolean): Promise<ConnectionResult>;
121
+ connect(connectionObject: ConnectionData, options: ConnectionOptions): Promise<ConnectionResult>;
119
122
  private ensureTempLibraryExists;
120
123
  private ensureTempDirectory;
121
124
  /**
@@ -1,11 +1,10 @@
1
1
  /// <reference types="node" />
2
2
  /// <reference types="node" />
3
3
  import * as node_ssh from "node-ssh";
4
- import { EditorPath } from '../typings';
5
4
  import { FilterType } from './Filter';
6
5
  import { default as IBMi } from './IBMi';
7
6
  import { Tools } from './Tools';
8
- import { AttrOperands, CommandResult, IBMiError, IBMiMember, IBMiObject, IFSFile, ModuleExport, ProgramExportImportInfo, QsysPath, SpecialAuthorities } from './types';
7
+ import { AttrOperands, CommandResult, EditorPath, IBMiError, IBMiMember, IBMiObject, IFSFile, ModuleExport, ProgramExportImportInfo, QsysPath, SpecialAuthorities } from './types';
9
8
  declare type Authority = "*ADD" | "*DLT" | "*EXECUTE" | "*READ" | "*UPD" | "*NONE" | "*ALL" | "*CHANGE" | "*USE" | "*EXCLUDE" | "*AUTLMGT";
10
9
  export declare type SortOrder = `name` | `type`;
11
10
  export declare type SortOptions = {
package/api/Tools.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { IBMiMessages, QsysPath } from './types';
2
- import { EditorPath } from "../typings";
1
+ import { EditorPath, IBMiMessages, QsysPath } from './types';
3
2
  export declare namespace Tools {
4
3
  class SqlError extends Error {
5
4
  sqlstate: string;
@@ -1,13 +1,20 @@
1
- export declare abstract class BaseStorage {
2
- protected readonly globalState: any;
3
- private uniqueKeyPrefix;
4
- constructor(globalState: any);
1
+ /// <reference types="vscode" />
2
+ /**
3
+ * A common type that works for both a Map and VS Code's Memento
4
+ */
5
+ export declare type GlobalState = {
6
+ keys(): Iterable<string>;
7
+ get<T>(key: string): T | undefined;
8
+ update?(key: string, value: any): Thenable<void>;
9
+ set?(key: string, value: any): void;
10
+ };
11
+ export declare class BaseStorage {
12
+ protected readonly globalState: GlobalState;
13
+ private uniqueKeyPrefix?;
14
+ constructor(globalState: GlobalState);
5
15
  keys(): readonly string[];
6
16
  setUniqueKeyPrefix(prefix: string): void;
7
17
  get<T>(key: string): T | undefined;
8
18
  set(key: string, value: any): Promise<void>;
9
19
  getStorageKey(key: string): string;
10
20
  }
11
- export declare class VirtualStorage extends BaseStorage {
12
- constructor();
13
- }
@@ -1,5 +1,5 @@
1
- import { AspInfo, ConnectionData } from "../../types";
2
1
  import { ComponentInstallState } from "../../components/component";
2
+ import { AspInfo, ConnectionData } from "../../types";
3
3
  import { BaseStorage } from "./BaseStorage";
4
4
  export declare type PathContent = Record<string, string[]>;
5
5
  export declare type DeploymentPath = Record<string, string>;
@@ -1,5 +1,5 @@
1
1
  import { BaseStorage } from "./BaseStorage";
2
- import { PathContent, DeploymentPath, DebugCommands } from "./CodeForIStorage";
2
+ import { DebugCommands, DeploymentPath, PathContent } from "./CodeForIStorage";
3
3
  declare type AuthorisedExtension = {
4
4
  id: string;
5
5
  displayName: string;
@@ -8,7 +8,7 @@ declare type AuthorisedExtension = {
8
8
  };
9
9
  export declare class ConnectionStorage {
10
10
  private internalStorage;
11
- private connectionName;
11
+ private connectionName?;
12
12
  constructor(internalStorage: BaseStorage);
13
13
  get ready(): boolean;
14
14
  setConnectionName(connectionName: string): void;
@@ -33,5 +33,6 @@ export declare class ConnectionStorage {
33
33
  revokeExtensionAuthorisation(...extensions: AuthorisedExtension[]): Promise<void>;
34
34
  hasMessageBeenShown(messageId: string): boolean;
35
35
  markMessageAsShown(messageId: string): Promise<void>;
36
+ unmarkMessageAsShown(messageId: string): Promise<void>;
36
37
  }
37
38
  export {};
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";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@halcyontech/vscode-ibmi-types",
3
- "version": "2.16.3",
3
+ "version": "2.17.2",
4
4
  "description": "Types for vscode-ibmi",
5
5
  "typings": "./typings.d.ts",
6
6
  "scripts": {
package/typings.d.ts CHANGED
@@ -20,8 +20,5 @@ export interface DeploymentParameters {
20
20
  remotePath: string;
21
21
  ignoreRules?: Ignore;
22
22
  }
23
- export declare type EditorPath = string | {
24
- fsPath: string;
25
- };
26
23
  export * from "./api/types";
27
24
  export * from "./ui/types";
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[]>;
@@ -1,10 +0,0 @@
1
- import * as vscode from 'vscode';
2
- import { BaseStorage } from '../api/configuration/storage/BaseStorage';
3
- export declare class VsStorage extends BaseStorage {
4
- protected readonly globalState: vscode.Memento;
5
- private connectionName;
6
- constructor(context: vscode.ExtensionContext);
7
- keys(): readonly string[];
8
- get<T>(key: string): T | undefined;
9
- set(key: string, value: any): Promise<void>;
10
- }