@halcyontech/vscode-ibmi-types 1.6.8 → 1.6.13

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,69 @@
1
+ export = CompileTools;
2
+ declare class CompileTools {
3
+ /**
4
+ * @param {vscode.ExtensionContext} context
5
+ */
6
+ static register(context: vscode.ExtensionContext): void;
7
+ /**
8
+ * Does what it says on the tin.
9
+ */
10
+ static clearDiagnostics(): void;
11
+ /**
12
+ * @param {Instance} instance
13
+ * @param {{asp?: string, lib: string, object: string, ext?: string, workspace?: number}} evfeventInfo
14
+ */
15
+ static refreshDiagnostics(instance: Instance, evfeventInfo: {
16
+ asp?: string;
17
+ lib: string;
18
+ object: string;
19
+ ext?: string;
20
+ workspace?: number;
21
+ }): Promise<void>;
22
+ /**
23
+ *
24
+ * @param {string} string
25
+ * @param {{[name: string]: string}} variables
26
+ */
27
+ static replaceValues(string: string, variables: {
28
+ [name: string]: string;
29
+ }): string;
30
+ /**
31
+ *
32
+ * @param {Instance} instance
33
+ * @returns
34
+ */
35
+ static getDefaultVariables(instance: Instance): {
36
+ [name: string]: string;
37
+ };
38
+ /**
39
+ * @param {Instance} instance
40
+ * @param {vscode.Uri} uri
41
+ */
42
+ static RunAction(instance: Instance, uri: vscode.Uri): Promise<void>;
43
+ /**
44
+ * Execute command
45
+ * @param {Instance} instance
46
+ * @param {import("../typings").RemoteCommand} options
47
+ * @returns {Promise<import("../typings").CommandResult|null>}
48
+ */
49
+ static runCommand(instance: Instance, options: import("../typings").RemoteCommand): Promise<import("../typings").CommandResult | null>;
50
+ static showOutput(): void;
51
+ static appendOutput(output: any): void;
52
+ /**
53
+ * @param {string} name Name of action
54
+ * @param {string} command Command string
55
+ * @return {Promise<string>} new command
56
+ */
57
+ static showCustomInputs(name: string, command: string): Promise<string>;
58
+ /**
59
+ *
60
+ * @param {string} baseCommand
61
+ * @returns {{lib?: string, object: string}}
62
+ */
63
+ static getObjectFromCommand(baseCommand: string): {
64
+ lib?: string;
65
+ object: string;
66
+ };
67
+ }
68
+ import vscode = require("vscode");
69
+ import { default as Instance } from "./Instance";
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,27 @@
1
+ import vscode from 'vscode';
2
+ import Instance from '../Instance';
3
+ import { Ignore } from 'ignore';
4
+ export declare namespace Deployment {
5
+ interface DeploymentParameters {
6
+ method: Method;
7
+ localFolder: vscode.Uri;
8
+ remotePath: string;
9
+ ignoreRules?: Ignore;
10
+ }
11
+ enum Method {
12
+ "all" = 0,
13
+ "staged" = 1,
14
+ "unstaged" = 2,
15
+ "changed" = 3,
16
+ "compare" = 4
17
+ }
18
+ function initialize(context: vscode.ExtensionContext, instance: Instance): void;
19
+ /**
20
+ * Deploy a workspace to a remote IFS location.
21
+ * @param workspaceIndex if no index is provided, a prompt will be shown to pick one if there are multiple workspaces,
22
+ * otherwise the current workspace will be used.
23
+ * @returns the index of the deployed workspace or `undefined` if the deployment failed
24
+ */
25
+ function launchDeploy(workspaceIndex?: number): Promise<number | undefined>;
26
+ function deploy(parameters: DeploymentParameters): Promise<boolean>;
27
+ }
@@ -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.13",
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,14 @@
1
1
  /// <reference types="node" />
2
2
  import { ExtensionContext } from "vscode";
3
3
  import Instance from "./api/Instance";
4
+ import { Deployment } from "./api/local/deployment";
4
5
  export interface CodeForIBMi {
5
6
  instance: Instance;
6
7
  baseContext: ExtensionContext;
7
8
  CustomUI: object;
8
9
  Field: object;
10
+ deploy: (parameters: Deployment.DeploymentParameters) => Promise<boolean>;
11
+ evfeventParser: (lines: string[]) => Map<string, FileError[]>;
9
12
  }
10
13
  export interface StandardIO {
11
14
  onStdout?: (data: Buffer) => void;
@@ -52,7 +55,7 @@ export interface ConnectionData {
52
55
  username: string;
53
56
  password?: string;
54
57
  privateKey: string | null;
55
- keepaliveInterval: number;
58
+ keepaliveInterval?: number;
56
59
  }
57
60
  export interface Server {
58
61
  name: string;
@@ -88,3 +91,15 @@ export interface IBMiError {
88
91
  code: string;
89
92
  text: string;
90
93
  }
94
+ export interface Filter {
95
+ library: string;
96
+ filter: string;
97
+ }
98
+ export interface FileError {
99
+ sev: number;
100
+ linenum: number;
101
+ column: number;
102
+ toColumn: number;
103
+ text: string;
104
+ code: string;
105
+ }