@halcyontech/vscode-ibmi-types 2.0.0 → 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.
@@ -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
- interface EvfEventInfo {
10
- asp?: string;
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
- export function runCommand(instance: Instance, options: RemoteCommand, title?: string): Promise<CommandResult | null>;
27
- export {};
14
+ function runCommand(instance: Instance, options: RemoteCommand, title?: string): Promise<CommandResult | null>;
28
15
  }
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>;
@@ -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>;
@@ -0,0 +1,2 @@
1
+ import { FileError } from "../../typings";
2
+ export declare function parseErrors(lines: string[]): Map<string, FileError[]>;
@@ -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
- * Deploy a workspace to a remote IFS location.
7
- * @param workspaceIndex if no index is provided, a prompt will be shown to pick one if there are multiple workspaces,
8
- * otherwise the current workspace will be used.
9
- * @returns the index of the deployed workspace or `undefined` if the deployment failed
10
- */
11
- function launchDeploy(workspaceIndex?: number): Promise<number | undefined>;
12
- function deploy(parameters: DeploymentParameters): Promise<boolean>;
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
  }
@@ -0,0 +1,2 @@
1
+ import { Locale } from "..";
2
+ export declare const da: Locale;
@@ -0,0 +1,2 @@
1
+ import { Locale } from "..";
2
+ export declare const en: Locale;
@@ -0,0 +1,2 @@
1
+ import { Locale } from "..";
2
+ export declare const fr: Locale;
@@ -0,0 +1,5 @@
1
+ export declare type Locale = {
2
+ [id: string]: string;
3
+ };
4
+ export declare function updateLocale(): void;
5
+ export declare function t(id: string, ...values: any[]): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@halcyontech/vscode-ibmi-types",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "Types for vscode-ibmi",
5
5
  "typings": "./typings.d.ts",
6
6
  "scripts": {
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
- deploy: (parameters: DeploymentParameters) => Promise<boolean>;
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: string[];
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
- linenum: number;
113
+ lineNum: number;
114
+ toLineNum: number;
111
115
  column: number;
112
116
  toColumn: number;
113
117
  text: string;