@halcyontech/vscode-ibmi-types 2.14.5 → 2.15.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.
Files changed (58) hide show
  1. package/{api/Instance.d.ts → Instance.d.ts} +25 -8
  2. package/api/CompileTools.d.ts +10 -6
  3. package/api/IBMi.d.ts +90 -46
  4. package/api/IBMiContent.d.ts +61 -10
  5. package/api/Search.d.ts +5 -5
  6. package/api/Tools.d.ts +3 -31
  7. package/{components → api/components}/component.d.ts +6 -1
  8. package/{components → api/components}/copyToImport.d.ts +2 -2
  9. package/{components → api/components}/cqsh/index.d.ts +4 -1
  10. package/{components → api/components}/getMemberInfo.d.ts +4 -3
  11. package/{components → api/components}/getNewLibl.d.ts +6 -1
  12. package/api/components/manager.d.ts +23 -0
  13. package/api/configVars.d.ts +1 -1
  14. package/api/{debug/config.d.ts → configuration/DebugConfiguration.d.ts} +9 -2
  15. package/api/configuration/config/ConnectionManager.d.ts +31 -0
  16. package/api/configuration/config/VirtualConfig.d.ts +9 -0
  17. package/api/configuration/config/types.d.ts +66 -0
  18. package/api/configuration/storage/BaseStorage.d.ts +11 -0
  19. package/api/configuration/storage/CodeForIStorage.d.ts +62 -0
  20. package/api/configuration/storage/ConnectionStorage.d.ts +36 -0
  21. package/api/errors/parser.d.ts +1 -1
  22. package/api/import/Objects.d.ts +1 -0
  23. package/api/types.d.ts +184 -0
  24. package/commands/actions.d.ts +3 -0
  25. package/commands/compare.d.ts +3 -0
  26. package/commands/connection.d.ts +3 -0
  27. package/commands/open.d.ts +7 -0
  28. package/commands/password.d.ts +3 -0
  29. package/config/Configuration.d.ts +9 -0
  30. package/config/Storage.d.ts +10 -0
  31. package/config/passwords.d.ts +4 -0
  32. package/{api/debug → debug}/certificates.d.ts +3 -6
  33. package/{api/debug → debug}/index.d.ts +1 -1
  34. package/{api/debug → debug}/server.d.ts +4 -4
  35. package/filesystems/ifsFs.d.ts +27 -0
  36. package/{api → filesystems}/local/actions.d.ts +1 -1
  37. package/{api → filesystems}/local/deployTools.d.ts +2 -1
  38. package/{api → filesystems}/local/deployment.d.ts +2 -2
  39. package/filesystems/qsys/FSUtils.d.ts +9 -0
  40. package/filesystems/qsys/QSysFs.d.ts +40 -0
  41. package/filesystems/qsys/extendedContent.d.ts +25 -0
  42. package/filesystems/qsys/sourceDateHandler.d.ts +26 -0
  43. package/instantiate.d.ts +2 -2
  44. package/package.json +2 -2
  45. package/typings.d.ts +13 -193
  46. package/ui/Tools.d.ts +52 -0
  47. package/ui/actions.d.ts +6 -0
  48. package/ui/connection.d.ts +3 -0
  49. package/ui/types.d.ts +26 -0
  50. package/{api → webviews}/CustomUI.d.ts +7 -0
  51. package/api/Configuration.d.ts +0 -95
  52. package/api/Storage.d.ts +0 -106
  53. package/components/manager.d.ts +0 -20
  54. /package/{api → filesystems}/local/LocalLanguageActions.d.ts +0 -0
  55. /package/{api → filesystems}/local/env.d.ts +0 -0
  56. /package/{api → filesystems}/local/git.d.ts +0 -0
  57. /package/{api → ui}/Terminal.d.ts +0 -0
  58. /package/{api/errors → ui}/diagnostics.d.ts +0 -0
@@ -0,0 +1,25 @@
1
+ import vscode from "vscode";
2
+ import { SourceDateHandler } from "./sourceDateHandler";
3
+ export declare class ExtendedIBMiContent {
4
+ readonly sourceDateHandler: SourceDateHandler;
5
+ constructor(sourceDateHandler: SourceDateHandler);
6
+ /**
7
+ * Download the contents of a source member using SQL.
8
+ * This option also stores the source dates internally.
9
+ * @param {vscode.Uri} uri
10
+ */
11
+ downloadMemberContentWithDates(uri: vscode.Uri): Promise<string>;
12
+ /**
13
+ * Determine the member record length
14
+ * @param {string} aliasPath member sql alias path e.g. ILEDITOR.QGPL_QRPGLESC_MYRPGPGM
15
+ * @param {string} lib
16
+ * @param {string} spf
17
+ */
18
+ private getRecordLength;
19
+ /**
20
+ * Upload to a member with source dates
21
+ * @param {vscode.Uri} uri
22
+ * @param {string} body
23
+ */
24
+ uploadMemberContentWithDates(uri: vscode.Uri, body: string): Promise<void>;
25
+ }
@@ -0,0 +1,26 @@
1
+ import vscode from "vscode";
2
+ export declare class SourceDateHandler {
3
+ readonly baseDates: Map<string, string[]>;
4
+ readonly baseSource: Map<string, string>;
5
+ readonly recordLengths: Map<string, number>;
6
+ private enabled;
7
+ private timeout?;
8
+ private readonly timeoutDelay;
9
+ private highlightSince?;
10
+ private highlightBefore?;
11
+ private lineEditedBefore?;
12
+ private readonly sourceDateSearchBarItem;
13
+ constructor(context: vscode.ExtensionContext);
14
+ setEnabled(enabled: boolean): void;
15
+ private onDidCloseDocument;
16
+ private onDidChangeEditor;
17
+ private onDidChangeTextDocument;
18
+ private _diffOnDidChange;
19
+ private _diffChangeTimeout;
20
+ private _diffRefreshGutter;
21
+ calcNewSourceDates(alias: string, body: string): string[];
22
+ private toggleSourceDateGutter;
23
+ private clearDateSearch;
24
+ private newDateSearch;
25
+ }
26
+ export declare function getAliasName(uri: vscode.Uri): string;
package/instantiate.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as vscode from "vscode";
2
- import Instance from "./api/Instance";
2
+ import Instance from "./Instance";
3
3
  export declare let instance: Instance;
4
- export declare function disconnect(): Promise<boolean>;
4
+ export declare function safeDisconnect(): Promise<boolean>;
5
5
  export declare function loadAllofExtension(context: vscode.ExtensionContext): Promise<void>;
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@halcyontech/vscode-ibmi-types",
3
- "version": "2.14.5",
3
+ "version": "2.15.0",
4
4
  "description": "Types for vscode-ibmi",
5
5
  "typings": "./typings.d.ts",
6
6
  "scripts": {
7
- "prepublish": "rm -rf filesystems schemas views webviews languages testing",
7
+ "prepublish": "rm -rf schemas ui/views webviews/*/* languages testing",
8
8
  "deploy": "npm publish --access public"
9
9
  },
10
10
  "repository": {
package/typings.d.ts CHANGED
@@ -1,207 +1,27 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- import { Ignore } from 'ignore';
4
- import { MarkdownString, ProviderResult, Range, TreeItem, TreeItemCollapsibleState, WorkspaceFolder } from "vscode";
5
- import { ConnectionConfiguration } from './api/Configuration';
6
- import { CustomUI } from "./api/CustomUI";
7
- import Instance from "./api/Instance";
8
- import { Tools } from "./api/Tools";
9
- import { DeployTools } from "./api/local/deployTools";
10
- import { ComponentRegistry } from './components/manager';
1
+ import { CustomUI } from "./webviews/CustomUI";
2
+ import Instance from "./Instance";
3
+ import { DeployTools } from "./filesystems/local/deployTools";
4
+ import { ComponentRegistry } from './api/components/manager';
5
+ import { DeploymentMethod, FileError } from "./api/types";
6
+ import { Ignore } from "ignore";
7
+ import { WorkspaceFolder } from "vscode";
8
+ import { VscodeTools } from "./ui/Tools";
11
9
  export interface CodeForIBMi {
12
10
  instance: Instance;
13
11
  customUI: () => CustomUI;
14
12
  deployTools: typeof DeployTools;
15
13
  evfeventParser: (lines: string[]) => Map<string, FileError[]>;
16
- tools: typeof Tools;
14
+ tools: typeof VscodeTools;
17
15
  componentRegistry: ComponentRegistry;
18
16
  }
19
- export declare type DeploymentMethod = "all" | "staged" | "unstaged" | "changed" | "compare";
20
17
  export interface DeploymentParameters {
21
18
  method: DeploymentMethod;
22
19
  workspaceFolder: WorkspaceFolder;
23
20
  remotePath: string;
24
21
  ignoreRules?: Ignore;
25
22
  }
26
- export interface StandardIO {
27
- onStdout?: (data: Buffer) => void;
28
- onStderr?: (data: Buffer) => void;
29
- stdin?: string;
30
- }
31
- /**
32
- * External interface for extensions to call `code-for-ibmi.runCommand`
33
- */
34
- export declare type ActionType = "member" | "streamfile" | "object" | "file";
35
- export declare type ActionRefresh = "no" | "parent" | "filter" | "browser";
36
- export declare type ActionEnvironment = "ile" | "qsh" | "pase";
37
- export declare enum CcsidOrigin {
38
- User = "user",
39
- System = "system"
40
- }
41
- export interface RemoteCommand {
42
- title?: string;
43
- command: string;
44
- environment?: ActionEnvironment;
45
- cwd?: string;
46
- env?: Record<string, string>;
47
- noLibList?: boolean;
48
- }
49
- export interface CommandData extends StandardIO {
50
- command: string;
51
- directory?: string;
52
- env?: Record<string, string>;
53
- }
54
- export interface CommandResult {
55
- code: number;
56
- stdout: string;
57
- stderr: string;
58
- command?: string;
59
- }
60
- export interface Action {
61
- name: string;
62
- command: string;
63
- type?: ActionType;
64
- environment: ActionEnvironment;
65
- extensions?: string[];
66
- deployFirst?: boolean;
67
- postDownload?: string[];
68
- refresh?: ActionRefresh;
69
- runOnProtected?: boolean;
70
- }
71
- export interface ConnectionData {
72
- name: string;
73
- host: string;
74
- port: number;
75
- username: string;
76
- password?: string;
77
- privateKeyPath?: string;
78
- keepaliveInterval?: number;
79
- }
80
- export interface Server {
81
- name: string;
82
- }
83
- export interface Profile {
84
- profile: string;
85
- }
86
- export interface QsysPath {
87
- asp?: string;
88
- library: string;
89
- name: string;
90
- }
91
- export interface IBMiObject extends QsysPath {
92
- type: string;
93
- text: string;
94
- sourceFile?: boolean;
95
- attribute?: string;
96
- sourceLength?: number;
97
- size?: number;
98
- created?: Date;
99
- changed?: Date;
100
- created_by?: string;
101
- owner?: string;
102
- }
103
- export interface IBMiMember {
104
- library: string;
105
- file: string;
106
- name: string;
107
- extension: string;
108
- recordLength?: number;
109
- text?: string;
110
- asp?: string;
111
- lines?: number;
112
- created?: Date;
113
- changed?: Date;
114
- }
115
- export interface IFSFile {
116
- type: "directory" | "streamfile";
117
- name: string;
118
- path: string;
119
- size?: number;
120
- modified?: Date;
121
- owner?: string;
122
- }
123
- export interface IBMiError {
124
- code: string;
125
- text: string;
126
- }
127
- export interface FileError {
128
- sev: number;
129
- lineNum: number;
130
- toLineNum: number;
131
- column: number;
132
- toColumn: number;
133
- text: string;
134
- code: string;
135
- }
136
- export interface QsysFsOptions {
137
- readonly?: boolean;
138
- }
139
- export declare type IBMiEvent = "connected" | "disconnected" | "deployLocation" | "deploy";
140
- export interface WithPath {
141
- path: string;
142
- }
143
- export interface WithLibrary {
144
- library: string;
145
- }
146
- export declare type FocusOptions = {
147
- select?: boolean;
148
- focus?: boolean;
149
- expand?: boolean | number;
150
- };
151
- export declare type BrowserItemParameters = {
152
- icon?: string;
153
- color?: string;
154
- state?: TreeItemCollapsibleState;
155
- parent?: BrowserItem;
156
- };
157
- export declare class BrowserItem extends TreeItem {
158
- readonly params?: BrowserItemParameters;
159
- constructor(label: string, params?: BrowserItemParameters);
160
- get parent(): BrowserItem;
161
- getChildren?(): ProviderResult<BrowserItem[]>;
162
- refresh?(): void;
163
- reveal?(options?: FocusOptions): Thenable<void>;
164
- getToolTip?(): Promise<MarkdownString | undefined>;
165
- }
166
- export interface FilteredItem {
167
- filter: ConnectionConfiguration.ObjectFilters;
168
- }
169
- export interface ObjectItem extends FilteredItem, WithPath {
170
- object: IBMiObject;
171
- }
172
- export interface MemberItem extends FilteredItem, WithPath {
173
- member: IBMiMember;
174
- }
175
- export declare type IBMiMessage = {
176
- id: string;
177
- text: string;
178
- };
179
- export declare type IBMiMessages = {
180
- messages: IBMiMessage[];
181
- findId(id: string): IBMiMessage | undefined;
182
- };
183
- export declare const OBJECT_BROWSER_MIMETYPE = "application/vnd.code.tree.objectbrowser";
184
- export declare const IFS_BROWSER_MIMETYPE = "application/vnd.code.tree.ifsbrowser";
185
- export declare type OpenEditableOptions = QsysFsOptions & {
186
- position?: Range;
187
- };
188
- export interface WrapResult {
189
- newStatements: string[];
190
- outStmf: string;
191
- }
192
- export declare type SpecialAuthorities = "*ALLOBJ" | "*AUDIT" | "*IOSYSCFG" | "*JOBCTL" | "*SAVSYS" | "*SECADM" | "*SERVICE" | "*SPLCTL";
193
- export declare type AttrOperands = 'ACCESS_TIME' | 'ALLOC_SIZE' | 'ALLOC_SIZE_64' | 'ALWCKPWR' | 'ALWSAV' | 'ASP' | 'AUDIT' | 'AUTH_GROUP' | 'AUTH_LIST_NAME' | 'AUTH_OWNER' | 'AUTH_USERS' | 'CCSID' | 'CHANGE_TIME' | 'CHECKED_OUT' | 'CHECKED_OUT_USER' | 'CHECKED_OUT_TIME' | 'CODEPAGE' | 'CREATE_TIME' | 'CRTOBJAUD' | 'CRTOBJSCAN' | 'DATA_SIZE' | 'DATA_SIZE_64' | 'DIR_FORMAT' | 'DISK_STG_OPT' | 'EXTENDED_ATTR_SIZE' | 'FILE_FORMAT' | 'FILE_ID' | 'JOURNAL_APPLY_CHANGES' | 'JOURNAL_ID' | 'JOURNAL_LIBRARY' | 'JOURNAL_NAME' | 'JOURNAL_OPTIONS' | 'JOURNAL_RCVR_ASP' | 'JOURNAL_RCVR_LIBRARY' | 'JOURNAL_RCVR_NAME' | 'JOURNAL_ROLLBACK_ENDED' | 'JOURNAL_START_TIME' | 'JOURNAL_STATUS' | 'LOCAL_REMOTE' | 'MAIN_STG_OPT' | 'MODIFY_TIME' | 'MULT_SIGS' | 'OBJTYPE' | 'PC_ARCHIVE' | 'PC_HIDDEN' | 'PC_READ_ONLY' | 'PC_SYSTEM' | 'RSTDRNMUNL' | 'SCAN' | 'SCAN_BINARY' | 'SCAN_CCSID1' | 'SCAN_CCSID2' | 'SCAN_SIGS_DIFF' | 'SCAN_STATUS' | 'SGID' | 'SIGNED' | 'STG_FREE' | 'SUID' | 'SYSTEM_ARCHIVE' | 'SYSTEM_USE' | 'SYS_SIGNED' | 'UDFS_DEFAULT_FORMAT' | 'USAGE_DAYS_USED' | 'USAGE_LAST_USED_TIME' | 'USAGE_RESET_TIME';
194
- export declare type SearchResults = {
195
- term: string;
196
- hits: SearchHit[];
197
- };
198
- export declare type SearchHit = {
199
- path: string;
200
- lines: SearchHitLine[];
201
- readonly?: boolean;
202
- label?: string;
203
- };
204
- export declare type SearchHitLine = {
205
- number: number;
206
- content: string;
23
+ export declare type EditorPath = string | {
24
+ fsPath: string;
207
25
  };
26
+ export * from "./api/types";
27
+ export * from "./ui/types";
package/ui/Tools.d.ts ADDED
@@ -0,0 +1,52 @@
1
+ import vscode from "vscode";
2
+ import { API } from "../filesystems/local/gitApi";
3
+ import { IBMiObject, IBMiMember, IFSFile } from '../typings';
4
+ import IBMi from '../api/IBMi';
5
+ import { Tools } from '../api/Tools';
6
+ export declare namespace VscodeTools {
7
+ function getGitAPI(): API | undefined;
8
+ function md5Hash(file: vscode.Uri): string;
9
+ /**
10
+ * Check whether two given uris point to the same file/member
11
+ */
12
+ function areEquivalentUris(uriA: vscode.Uri, uriB: vscode.Uri): boolean;
13
+ /**
14
+ * We do this to find previously opened files with the same path, but different case OR readonly flags.
15
+ * Without this, it's possible for the same document to be opened twice simply due to the readonly flag.
16
+ */
17
+ function findExistingDocumentUri(uri: vscode.Uri): vscode.Uri;
18
+ function findExistingDocument(uri: vscode.Uri): vscode.TextDocument;
19
+ function findExistingDocumentByName(nameAndExt: string): vscode.Uri;
20
+ /**
21
+ * Given the uri of a member or other resource, find all
22
+ * (if any) open tabs where that resource is being edited.
23
+ */
24
+ function findUriTabs(uriToFind: vscode.Uri | string): vscode.Tab[];
25
+ function generateTooltipHtmlTable(header: string, rows: Record<string, any>): string;
26
+ /**
27
+ * Runs a function while a context value is set to true.
28
+ *
29
+ * If multiple callers call this function with the same context, only the last one returning will unset the context value.
30
+ *
31
+ * @param context the context value that will be set to `true` during `task` execution
32
+ * @param task the function to run while the context value is `true`
33
+ */
34
+ function withContext<T>(context: string, task: () => Promise<T>): Promise<T>;
35
+ function objectToToolTip(path: string, object: IBMiObject): vscode.MarkdownString;
36
+ function sourcePhysicalFileToToolTip(connection: IBMi, path: string, object: IBMiObject): Promise<vscode.MarkdownString>;
37
+ function memberToToolTip(path: string, member: IBMiMember): vscode.MarkdownString;
38
+ function ifsFileToToolTip(path: string, ifsFile: IFSFile): vscode.MarkdownString;
39
+ const qualifyPath: typeof Tools.qualifyPath;
40
+ const unqualifyPath: typeof Tools.unqualifyPath;
41
+ const escapePath: typeof Tools.escapePath;
42
+ const distinct: typeof Tools.distinct;
43
+ const capitalize: typeof Tools.capitalize;
44
+ const sanitizeObjNamesForPase: typeof Tools.sanitizeObjNamesForPase;
45
+ const parseMessages: typeof Tools.parseMessages;
46
+ const parseQSysPath: typeof Tools.parseQSysPath;
47
+ const fileToPath: typeof Tools.fileToPath;
48
+ const fixWindowsPath: typeof Tools.fixWindowsPath;
49
+ const parseAttrDate: typeof Tools.parseAttrDate;
50
+ const normalizePath: typeof Tools.normalizePath;
51
+ const resolvePath: typeof Tools.resolvePath;
52
+ }
@@ -0,0 +1,6 @@
1
+ import Instance from '../Instance';
2
+ import { Action, DeploymentMethod } from '../typings';
3
+ import vscode, { WorkspaceFolder } from 'vscode';
4
+ import { BrowserItem } from './types';
5
+ export declare function registerActionTools(context: vscode.ExtensionContext): void;
6
+ export declare function runAction(instance: Instance, uri: vscode.Uri, customAction?: Action, method?: DeploymentMethod, browserItem?: BrowserItem, workspaceFolder?: WorkspaceFolder): Promise<boolean>;
@@ -0,0 +1,3 @@
1
+ import IBMi, { ConnectionErrorCode, ConnectionMessageType } from "../api/IBMi";
2
+ export declare function messageCallback(type: ConnectionMessageType, message: string): void;
3
+ export declare function handleConnectionResults(connection: IBMi, error: ConnectionErrorCode, data: any): Promise<boolean>;
package/ui/types.d.ts ADDED
@@ -0,0 +1,26 @@
1
+ import { TreeItemCollapsibleState, TreeItem, ProviderResult, MarkdownString } from "vscode";
2
+ import { FocusOptions, IBMiMember, IBMiObject, ObjectFilters, WithPath } from "../api/types";
3
+ export declare type BrowserItemParameters = {
4
+ icon?: string;
5
+ color?: string;
6
+ state?: TreeItemCollapsibleState;
7
+ parent?: BrowserItem;
8
+ };
9
+ export interface FilteredItem {
10
+ filter: ObjectFilters;
11
+ }
12
+ export interface ObjectItem extends FilteredItem, WithPath {
13
+ object: IBMiObject;
14
+ }
15
+ export interface MemberItem extends FilteredItem, WithPath {
16
+ member: IBMiMember;
17
+ }
18
+ export declare class BrowserItem extends TreeItem {
19
+ readonly params?: BrowserItemParameters;
20
+ constructor(label: string, params?: BrowserItemParameters);
21
+ get parent(): BrowserItem;
22
+ getChildren?(): ProviderResult<BrowserItem[]>;
23
+ refresh?(): void;
24
+ reveal?(options?: FocusOptions): Thenable<void>;
25
+ getToolTip?(): Promise<MarkdownString | undefined>;
26
+ }
@@ -25,6 +25,7 @@ export interface ComplexTab {
25
25
  label: string;
26
26
  fields: Field[];
27
27
  }
28
+ declare type InputType = "text" | "number";
28
29
  export declare class Section {
29
30
  readonly fields: Field[];
30
31
  addHeading(label: string, level?: 1 | 2 | 3 | 4 | 5 | 6): this;
@@ -37,6 +38,9 @@ export declare class Section {
37
38
  minlength?: number;
38
39
  maxlength?: number;
39
40
  regexTest?: string;
41
+ inputType?: InputType;
42
+ min?: number;
43
+ max?: number;
40
44
  }): this;
41
45
  addParagraph(label: string): this;
42
46
  addFile(id: string, label: string, description?: string): this;
@@ -101,6 +105,9 @@ export declare class Field {
101
105
  minlength?: number;
102
106
  maxlength?: number;
103
107
  regexTest?: string;
108
+ inputType?: InputType;
109
+ min?: number;
110
+ max?: number;
104
111
  constructor(type: FieldType, id: string, label: string, description?: string);
105
112
  getHTML(): string;
106
113
  private renderLabel;
@@ -1,95 +0,0 @@
1
- import * as vscode from 'vscode';
2
- import { ConnectionData, DeploymentMethod } from '../typings';
3
- import { FilterType } from './Filter';
4
- export declare type SourceDateMode = "edit" | "diff";
5
- export declare type DefaultOpenMode = "browse" | "edit";
6
- export declare type ReconnectMode = "always" | "never" | "ask";
7
- export declare function onCodeForIBMiConfigurationChange<T>(props: string | string[], todo: (value: vscode.ConfigurationChangeEvent) => void): vscode.Disposable;
8
- export declare namespace GlobalConfiguration {
9
- function get<T>(key: string): T | undefined;
10
- function set(key: string, value: any): Thenable<void>;
11
- }
12
- export interface StoredConnection {
13
- index: number;
14
- data: ConnectionData;
15
- }
16
- export declare namespace ConnectionManager {
17
- function getByName(name: string): StoredConnection | undefined;
18
- function sort(): Thenable<void>;
19
- function getAll(): ConnectionData[];
20
- function storeNew(data: ConnectionData): Promise<StoredConnection>;
21
- function deleteByName(name: string): Thenable<void>;
22
- function updateByIndex(index: number, data: ConnectionData): Thenable<void>;
23
- function getStoredPassword(context: vscode.ExtensionContext, connectionName: string): Thenable<string>;
24
- function setStoredPassword(context: vscode.ExtensionContext, connectionName: string, password: string): Thenable<void>;
25
- function deleteStoredPassword(context: vscode.ExtensionContext, connectionName: string): Thenable<void>;
26
- }
27
- export declare namespace ConnectionConfiguration {
28
- interface Parameters extends ConnectionProfile {
29
- host: string;
30
- autoClearTempData: boolean;
31
- connectionProfiles: ConnectionProfile[];
32
- commandProfiles: CommandProfile[];
33
- autoSortIFSShortcuts: boolean;
34
- tempLibrary: string;
35
- tempDir: string;
36
- sourceASP: string;
37
- sourceFileCCSID: string;
38
- autoConvertIFSccsid: boolean;
39
- hideCompileErrors: string[];
40
- enableSourceDates: boolean;
41
- sourceDateMode: SourceDateMode;
42
- sourceDateGutter: boolean;
43
- encodingFor5250: string;
44
- terminalFor5250: string;
45
- setDeviceNameFor5250: boolean;
46
- connectringStringFor5250: string;
47
- autoSaveBeforeAction: boolean;
48
- showDescInLibList: boolean;
49
- debugPort: string;
50
- debugSepPort: string;
51
- debugUpdateProductionFiles: boolean;
52
- debugEnableDebugTracing: boolean;
53
- readOnlyMode: boolean;
54
- quickConnect: boolean;
55
- defaultDeploymentMethod: DeploymentMethod | '';
56
- protectedPaths: string[];
57
- showHiddenFiles: boolean;
58
- lastDownloadLocation: string;
59
- [name: string]: any;
60
- }
61
- interface ObjectFilters {
62
- name: string;
63
- filterType: FilterType;
64
- library: string;
65
- object: string;
66
- types: string[];
67
- member: string;
68
- memberType: string;
69
- protected: boolean;
70
- }
71
- interface CustomVariable {
72
- name: string;
73
- value: string;
74
- }
75
- interface ConnectionProfile {
76
- name: string;
77
- homeDirectory: string;
78
- currentLibrary: string;
79
- libraryList: string[];
80
- objectFilters: ObjectFilters[];
81
- ifsShortcuts: string[];
82
- customVariables: CustomVariable[];
83
- }
84
- interface CommandProfile {
85
- name: string;
86
- command: string;
87
- }
88
- function update(parameters: Parameters): Promise<void>;
89
- /**
90
- * Will load an existing config if it exists, otherwise will create it with default values.
91
- * @param name Connection name string for configuration
92
- * @returns the parameters
93
- */
94
- function load(name: string): Promise<Parameters>;
95
- }
package/api/Storage.d.ts DELETED
@@ -1,106 +0,0 @@
1
- import vscode from 'vscode';
2
- import { ConnectionData } from '../typings';
3
- export declare type PathContent = Record<string, string[]>;
4
- export declare type DeploymentPath = Record<string, string>;
5
- export declare type DebugCommands = Record<string, string>;
6
- declare type AuthorisedExtension = {
7
- id: string;
8
- displayName: string;
9
- since: number;
10
- lastAccess: number;
11
- };
12
- declare abstract class Storage {
13
- protected readonly globalState: any;
14
- constructor(context: vscode.ExtensionContext);
15
- protected keys(): readonly string[];
16
- protected get<T>(key: string): T | undefined;
17
- protected set(key: string, value: any): Promise<void>;
18
- protected abstract getStorageKey(key: string): string;
19
- }
20
- export declare type LastConnection = {
21
- name: string;
22
- timestamp: number;
23
- };
24
- export declare type CachedServerSettings = {
25
- lastCheckedOnVersion: string | undefined;
26
- aspInfo: {
27
- [id: number]: string;
28
- };
29
- qccsid: number | null;
30
- jobCcsid: number | null;
31
- remoteFeatures: {
32
- [name: string]: string | undefined;
33
- };
34
- remoteFeaturesKeys: string | null;
35
- badDataAreasChecked: boolean | null;
36
- libraryListValidated: boolean | null;
37
- pathChecked?: boolean;
38
- userDefaultCCSID: number | null;
39
- debugConfigLoaded: boolean;
40
- maximumArgsLength: number;
41
- } | undefined;
42
- export declare class GlobalStorage extends Storage {
43
- private static instance;
44
- static initialize(context: vscode.ExtensionContext): void;
45
- static get(): GlobalStorage;
46
- private constructor();
47
- protected getStorageKey(key: string): string;
48
- getLastConnections(): LastConnection[];
49
- setLastConnection(name: string): Promise<void>;
50
- setLastConnections(lastConnections: LastConnection[]): Promise<void>;
51
- getServerSettingsCache(name: string): {
52
- lastCheckedOnVersion: string;
53
- aspInfo: {
54
- [id: number]: string;
55
- };
56
- qccsid: number;
57
- jobCcsid: number;
58
- remoteFeatures: {
59
- [name: string]: string;
60
- };
61
- remoteFeaturesKeys: string;
62
- badDataAreasChecked: boolean;
63
- libraryListValidated: boolean;
64
- pathChecked?: boolean;
65
- userDefaultCCSID: number;
66
- debugConfigLoaded: boolean;
67
- maximumArgsLength: number;
68
- };
69
- setServerSettingsCache(name: string, serverSettings: CachedServerSettings): Promise<void>;
70
- setServerSettingsCacheSpecific(name: string, newSettings: Partial<CachedServerSettings>): Promise<void>;
71
- deleteServerSettingsCache(name: string): Promise<void>;
72
- deleteStaleServerSettingsCache(connections: ConnectionData[]): Promise<void>;
73
- getPreviousSearchTerms(): string[];
74
- addPreviousSearchTerm(term: string): Promise<void>;
75
- clearPreviousSearchTerms(): Promise<void>;
76
- getPreviousFindTerms(): string[];
77
- addPreviousFindTerm(term: string): Promise<void>;
78
- clearPreviousFindTerms(): Promise<void>;
79
- }
80
- export declare class ConnectionStorage extends Storage {
81
- private connectionName;
82
- constructor(context: vscode.ExtensionContext);
83
- get ready(): boolean;
84
- setConnectionName(connectionName: string): void;
85
- protected getStorageKey(key: string): string;
86
- getSourceList(): PathContent;
87
- setSourceList(sourceList: PathContent): Promise<void>;
88
- getLastProfile(): string;
89
- setLastProfile(lastProfile: string): Promise<void>;
90
- getPreviousCurLibs(): string[];
91
- setPreviousCurLibs(previousCurLibs: string[]): Promise<void>;
92
- getDeployment(): DeploymentPath;
93
- setDeployment(existingPaths: DeploymentPath): Promise<void>;
94
- getDebugCommands(): DebugCommands;
95
- setDebugCommands(existingCommands: DebugCommands): Promise<void>;
96
- getWorkspaceDeployPath(workspaceFolder: vscode.WorkspaceFolder): string;
97
- getRecentlyOpenedFiles(): string[];
98
- setRecentlyOpenedFiles(recentlyOpenedFiles: string[]): Promise<void>;
99
- clearRecentlyOpenedFiles(): Promise<void>;
100
- grantExtensionAuthorisation(extension: vscode.Extension<any>): Promise<void>;
101
- getExtensionAuthorisation(extension: vscode.Extension<any>): AuthorisedExtension;
102
- getAuthorisedExtensions(): AuthorisedExtension[];
103
- revokeAllExtensionAuthorisations(): void;
104
- revokeExtensionAuthorisation(...extensions: AuthorisedExtension[]): Promise<void>;
105
- }
106
- export {};
@@ -1,20 +0,0 @@
1
- import vscode from "vscode";
2
- import IBMi from "../api/IBMi";
3
- import { ComponentState, IBMiComponent } from "./component";
4
- export declare class ComponentRegistry {
5
- private readonly components;
6
- registerComponent(context: vscode.ExtensionContext, component: IBMiComponent): void;
7
- getComponents(): Map<string, IBMiComponent[]>;
8
- }
9
- export declare const extensionComponentRegistry: ComponentRegistry;
10
- export declare class ComponentManager {
11
- private readonly connection;
12
- private readonly registered;
13
- constructor(connection: IBMi);
14
- getState(): {
15
- id: import("./component").ComponentIdentification;
16
- state: ComponentState;
17
- }[];
18
- startup(): Promise<void>;
19
- get<T extends IBMiComponent>(id: string, ignoreState?: boolean): T;
20
- }
File without changes
File without changes
File without changes
File without changes