@halcyontech/vscode-ibmi-types 2.1.1 → 2.2.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,4 +1,4 @@
1
- import vscode from 'vscode';
1
+ import vscode, { EventEmitter } from 'vscode';
2
2
  import { Action, CommandResult, DeploymentMethod, RemoteCommand } from '../typings';
3
3
  import Instance from './Instance';
4
4
  export interface ILELibrarySettings {
@@ -11,5 +11,5 @@ export declare namespace CompileTools {
11
11
  /**
12
12
  * Execute a command
13
13
  */
14
- function runCommand(instance: Instance, options: RemoteCommand, title?: string): Promise<CommandResult | null>;
14
+ function runCommand(instance: Instance, options: RemoteCommand, writeEvent?: EventEmitter<string>): Promise<CommandResult | null>;
15
15
  }
@@ -1,7 +1,8 @@
1
- /// <reference types="vscode" />
1
+ import * as vscode from 'vscode';
2
2
  export declare type SourceDateMode = "edit" | "diff";
3
+ export declare function onCodeForIBMiConfigurationChange<T>(props: string | string[], todo: (value: vscode.ConfigurationChangeEvent) => void): vscode.Disposable;
3
4
  export declare namespace GlobalConfiguration {
4
- function get<T>(prop: string): T | undefined;
5
+ function get<T>(key: string): T | undefined;
5
6
  function set(key: string, value: any): Thenable<void>;
6
7
  }
7
8
  export declare namespace ConnectionConfiguration {
package/api/CustomUI.d.ts CHANGED
@@ -42,7 +42,7 @@ export declare class Section {
42
42
  addComplexTabs(tabs: ComplexTab[], selected?: number): this;
43
43
  addSelect(id: string, label: string, items: SelectItem[], description?: string): this;
44
44
  addTree(id: string, label: string, treeItems: TreeListItem[], description?: string): this;
45
- addButtons(...buttons: Button[]): this;
45
+ addButtons(...buttons: (Button | undefined)[]): this;
46
46
  addField(field: Field): this;
47
47
  }
48
48
  export declare class CustomUI extends Section {
@@ -2,6 +2,7 @@ import { IBMiError, IBMiFile, IBMiMember, IBMiObject, IFSFile, QsysPath } from '
2
2
  import { default as IBMi } from './IBMi';
3
3
  import { Tools } from './Tools';
4
4
  declare type Authority = "*ADD" | "*DLT" | "*EXECUTE" | "*READ" | "*UPD" | "*NONE" | "*ALL" | "*CHANGE" | "*USE" | "*EXCLUDE" | "*AUTLMGT";
5
+ export declare type SortOrder = `name` | `type`;
5
6
  export declare type SortOptions = {
6
7
  order: "name" | "date" | "?";
7
8
  ascending?: boolean;
@@ -65,7 +66,7 @@ export default class IBMiContent {
65
66
  library: string;
66
67
  object?: string;
67
68
  types?: string[];
68
- }, sortOrder?: `name` | `type`): Promise<IBMiFile[]>;
69
+ }, sortOrder?: SortOrder): Promise<IBMiFile[]>;
69
70
  /**
70
71
  * @param lib
71
72
  * @param spf
package/api/Search.d.ts CHANGED
@@ -10,6 +10,6 @@ export declare namespace Search {
10
10
  number: number;
11
11
  content: string;
12
12
  }
13
- function searchMembers(instance: Instance, library: string, sourceFile: string, memberFilter: string, searchTerm: string, filter?: string): Promise<Result[]>;
13
+ function searchMembers(instance: Instance, library: string, sourceFile: string, memberFilter: string, searchTerm: string, readOnly?: boolean): Promise<Result[]>;
14
14
  function searchIFS(instance: Instance, path: string, searchTerm: string): Promise<Result[]>;
15
15
  }
package/api/Tools.d.ts CHANGED
@@ -39,4 +39,5 @@ export declare namespace Tools {
39
39
  function getGitAPI(): API | undefined;
40
40
  function distinct(value: any, index: number, array: any[]): boolean;
41
41
  function md5Hash(file: vscode.Uri): string;
42
+ function capitalize(text: string): string;
42
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@halcyontech/vscode-ibmi-types",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "description": "Types for vscode-ibmi",
5
5
  "typings": "./typings.d.ts",
6
6
  "scripts": {
package/typings.d.ts CHANGED
@@ -1,9 +1,11 @@
1
1
  /// <reference types="node" />
2
- import { WorkspaceFolder } from "vscode";
3
- import Instance from "./api/Instance";
4
2
  import { Ignore } from 'ignore';
3
+ import { TreeItem, TreeItemCollapsibleState, WorkspaceFolder } from "vscode";
4
+ import { ConnectionConfiguration } from './api/Configuration';
5
5
  import { CustomUI } from "./api/CustomUI";
6
+ import Instance from "./api/Instance";
6
7
  import { Tools } from "./api/Tools";
8
+ import { ProviderResult } from './api/import/git';
7
9
  import { DeployTools } from "./api/local/deployTools";
8
10
  export interface CodeForIBMi {
9
11
  instance: Instance;
@@ -28,6 +30,7 @@ export interface StandardIO {
28
30
  * External interface for extensions to call `code-for-ibmi.runCommand`
29
31
  */
30
32
  export interface RemoteCommand {
33
+ title?: string;
31
34
  command: string;
32
35
  environment?: "ile" | "qsh" | "pase";
33
36
  cwd?: string;
@@ -44,11 +47,13 @@ export interface CommandResult {
44
47
  stderr: string;
45
48
  command?: string;
46
49
  }
50
+ export declare type ActionType = "member" | "streamfile" | "object" | "file";
51
+ export declare type ActionEnvironment = "ile" | "qsh" | "pase";
47
52
  export interface Action {
48
53
  name: string;
49
54
  command: string;
50
- type?: "member" | "streamfile" | "object" | "file";
51
- environment: "ile" | "qsh" | "pase";
55
+ type?: ActionType;
56
+ environment: ActionEnvironment;
52
57
  extensions?: string[];
53
58
  deployFirst?: boolean;
54
59
  postDownload?: string[];
@@ -104,10 +109,6 @@ export interface IBMiError {
104
109
  code: string;
105
110
  text: string;
106
111
  }
107
- export interface Filter {
108
- library: string;
109
- filter: string;
110
- }
111
112
  export interface FileError {
112
113
  sev: number;
113
114
  lineNum: number;
@@ -121,6 +122,38 @@ export interface QsysFsOptions {
121
122
  readonly?: boolean;
122
123
  }
123
124
  export declare type IBMiEvent = "connected" | "disconnected" | "deployLocation" | "deploy";
124
- export interface Library {
125
+ export interface WithPath {
125
126
  path: string;
126
127
  }
128
+ export interface Library extends WithPath {
129
+ }
130
+ export declare type FocusOptions = {
131
+ select?: boolean;
132
+ focus?: boolean;
133
+ expand?: boolean | number;
134
+ };
135
+ export declare type BrowserItemParameters = {
136
+ icon?: string;
137
+ state?: TreeItemCollapsibleState;
138
+ parent?: BrowserItem;
139
+ };
140
+ export declare class BrowserItem extends TreeItem {
141
+ readonly params?: BrowserItemParameters;
142
+ constructor(label: string, params?: BrowserItemParameters);
143
+ get parent(): BrowserItem;
144
+ getChildren?(): ProviderResult<BrowserItem[]>;
145
+ refresh?(): void;
146
+ reveal?(options?: FocusOptions): Thenable<void>;
147
+ }
148
+ export interface FilteredItem {
149
+ filter: ConnectionConfiguration.ObjectFilters;
150
+ }
151
+ export interface ObjectItem extends FilteredItem, WithPath {
152
+ object: IBMiObject;
153
+ }
154
+ export interface SourcePhysicalFileItem extends FilteredItem, WithPath {
155
+ sourceFile: IBMiFile;
156
+ }
157
+ export interface MemberItem extends FilteredItem, WithPath {
158
+ member: IBMiMember;
159
+ }