@halcyontech/vscode-ibmi-types 1.6.8 → 1.6.14

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.
@@ -0,0 +1,24 @@
1
+ import vscode from 'vscode';
2
+ import Instance from './Instance';
3
+ import { CommandResult, RemoteCommand } from '../typings';
4
+ export declare namespace CompileTools {
5
+ interface EvfEventInfo {
6
+ asp?: string;
7
+ library: string;
8
+ object: string;
9
+ extension?: string;
10
+ workspace?: number;
11
+ }
12
+ export function register(context: vscode.ExtensionContext): void;
13
+ /**
14
+ * Does what it says on the tin.
15
+ */
16
+ export function clearDiagnostics(): void;
17
+ export function refreshDiagnostics(instance: Instance, evfeventInfo: EvfEventInfo): Promise<void>;
18
+ export function runAction(instance: Instance, uri: vscode.Uri): Promise<void>;
19
+ /**
20
+ * Execute a command
21
+ */
22
+ export function runCommand(instance: Instance, options: RemoteCommand): Promise<CommandResult | null>;
23
+ export {};
24
+ }
package/api/IBMi.d.ts CHANGED
@@ -2,13 +2,13 @@ import * as vscode from "vscode";
2
2
  import * as node_ssh from "node-ssh";
3
3
  import { ConnectionConfiguration } from "./Configuration";
4
4
  import { ConnectionData, CommandData, StandardIO, CommandResult } from "../typings";
5
- interface MemberParts {
6
- asp: string | undefined;
7
- library: string | undefined;
8
- file: string | undefined;
9
- member: string | undefined;
10
- extension: string | undefined;
11
- basename: string | undefined;
5
+ export interface MemberParts {
6
+ asp?: string;
7
+ library: string;
8
+ file: string;
9
+ member: string;
10
+ extension: string;
11
+ basename: string;
12
12
  }
13
13
  export default class IBMi {
14
14
  client: node_ssh.NodeSSH;
@@ -81,4 +81,3 @@ export default class IBMi {
81
81
  downloadDirectory(localDirectory: string | vscode.Uri, remoteDirectory: string, options?: node_ssh.SSHGetPutDirectoryOptions): Promise<void>;
82
82
  fileToPath(file: string | vscode.Uri): string;
83
83
  }
84
- export {};
@@ -31,7 +31,7 @@ export default class IBMiContent {
31
31
  * @param member Will default to file provided
32
32
  * @param deleteTable Will delete the table after download
33
33
  */
34
- getTable(library: string, file: string, member: string, deleteTable: boolean): Promise<Tools.DB2Row[]>;
34
+ getTable(library: string, file: string, member: string, deleteTable?: boolean): Promise<Tools.DB2Row[]>;
35
35
  /**
36
36
  * Get list of libraries with description and attribute
37
37
  * @param libraries Array of libraries to retrieve
package/api/Instance.d.ts CHANGED
@@ -18,5 +18,5 @@ export default class Instance {
18
18
  getConfig(): ConnectionConfiguration.Parameters;
19
19
  getContent(): IBMiContent;
20
20
  getStorage(): Storage;
21
- onEvent(event: "connected", func: Function): void;
21
+ onEvent(event: "connected" | "disconnected", func: Function): void;
22
22
  }
package/api/Storage.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import vscode from 'vscode';
2
- export interface PathContent extends Record<string, string[]> {
3
- }
2
+ export declare type PathContent = Record<string, string[]>;
3
+ export declare type DeploymentPath = Record<string, string>;
4
4
  export declare class Storage {
5
5
  readonly context: vscode.ExtensionContext;
6
6
  readonly connectionName: string;
@@ -13,6 +13,6 @@ export declare class Storage {
13
13
  setLastProfile(lastProfile: string): Promise<void>;
14
14
  getPreviousCurLibs(): string[];
15
15
  setPreviousCurLibs(previousCurLibs: string[]): Promise<void>;
16
- getDeployment(): PathContent;
17
- setDeployment(existingPaths: PathContent): Promise<void>;
16
+ getDeployment(): DeploymentPath;
17
+ setDeployment(existingPaths: DeploymentPath): Promise<void>;
18
18
  }
@@ -0,0 +1,3 @@
1
+ import { ConnectionData } from "../typings";
2
+ export declare function replace(data: string): string;
3
+ export declare function replaceAll(connectionObject: ConnectionData): void;
@@ -0,0 +1,4 @@
1
+ import { FileError } from "../../typings";
2
+ export declare function formatName(input: string): string;
3
+ export declare function formatIFS(path: string): string;
4
+ export declare function parseErrors(lines: string[]): Map<string, FileError[]>;
@@ -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
+ }
@@ -0,0 +1,7 @@
1
+ import { WorkspaceFolder } from "vscode";
2
+ import { Action } from "../../typings";
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[]>;
@@ -0,0 +1,14 @@
1
+ import vscode from 'vscode';
2
+ import Instance from '../Instance';
3
+ import { DeploymentParameters } from '../../typings';
4
+ export declare namespace Deployment {
5
+ function initialize(context: vscode.ExtensionContext, instance: Instance): 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
+ * @returns the index of the deployed workspace or `undefined` if the deployment failed
11
+ */
12
+ function launchDeploy(workspaceIndex?: number): Promise<number | undefined>;
13
+ function deploy(parameters: DeploymentParameters): Promise<boolean>;
14
+ }
@@ -0,0 +1,4 @@
1
+ import { WorkspaceFolder } from "vscode";
2
+ export declare function getEnvConfig(currentWorkspace: WorkspaceFolder): Promise<{
3
+ [key: string]: string;
4
+ }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@halcyontech/vscode-ibmi-types",
3
- "version": "1.6.8",
3
+ "version": "1.6.14",
4
4
  "description": "Types for vscode-ibmi",
5
5
  "typings": "./typings.d.ts",
6
6
  "scripts": {
package/sandbox.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import { ExtensionContext } from "vscode";
2
+ export declare function registerUriHandler(context: ExtensionContext): Promise<void>;
3
+ export declare function handleStartup(): Promise<void>;
package/typings.d.ts CHANGED
@@ -1,11 +1,27 @@
1
1
  /// <reference types="node" />
2
- import { ExtensionContext } from "vscode";
2
+ import { ExtensionContext, Uri } from "vscode";
3
3
  import Instance from "./api/Instance";
4
+ import { Ignore } from 'ignore';
4
5
  export interface CodeForIBMi {
5
6
  instance: Instance;
6
7
  baseContext: ExtensionContext;
7
8
  CustomUI: object;
8
9
  Field: object;
10
+ deploy: (parameters: DeploymentParameters) => Promise<boolean>;
11
+ evfeventParser: (lines: string[]) => Map<string, FileError[]>;
12
+ }
13
+ export declare enum DeploymentMethod {
14
+ "all" = 0,
15
+ "staged" = 1,
16
+ "unstaged" = 2,
17
+ "changed" = 3,
18
+ "compare" = 4
19
+ }
20
+ export interface DeploymentParameters {
21
+ method: DeploymentMethod;
22
+ localFolder: Uri;
23
+ remotePath: string;
24
+ ignoreRules?: Ignore;
9
25
  }
10
26
  export interface StandardIO {
11
27
  onStdout?: (data: Buffer) => void;
@@ -19,16 +35,12 @@ export interface RemoteCommand {
19
35
  command: string;
20
36
  environment?: "ile" | "qsh" | "pase";
21
37
  cwd?: string;
22
- env?: {
23
- [name: string]: string;
24
- };
38
+ env?: Record<string, string>;
25
39
  }
26
40
  export interface CommandData extends StandardIO {
27
41
  command: string;
28
42
  directory?: string;
29
- env?: {
30
- [name: string]: string;
31
- };
43
+ env?: Record<string, string>;
32
44
  }
33
45
  export interface CommandResult {
34
46
  code: number | null;
@@ -52,7 +64,7 @@ export interface ConnectionData {
52
64
  username: string;
53
65
  password?: string;
54
66
  privateKey: string | null;
55
- keepaliveInterval: number;
67
+ keepaliveInterval?: number;
56
68
  }
57
69
  export interface Server {
58
70
  name: string;
@@ -88,3 +100,15 @@ export interface IBMiError {
88
100
  code: string;
89
101
  text: string;
90
102
  }
103
+ export interface Filter {
104
+ library: string;
105
+ filter: string;
106
+ }
107
+ export interface FileError {
108
+ sev: number;
109
+ linenum: number;
110
+ column: number;
111
+ toColumn: number;
112
+ text: string;
113
+ code: string;
114
+ }