@halcyontech/vscode-ibmi-types 2.14.4 → 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,31 @@
1
+ import { Config } from "./VirtualConfig";
2
+ import { ConnectionData } from "../../types";
3
+ import { ConnectionConfig } from "./types";
4
+ export declare class ConnectionManager {
5
+ configMethod: Config;
6
+ /**
7
+ * A bit of a hack to access any piece of configuration. (like actions)
8
+ */
9
+ get<T>(key: string): T;
10
+ /**
11
+ * Same hack as get.
12
+ */
13
+ set(key: string, value: any): Promise<void>;
14
+ getByName(name: string): {
15
+ index: number;
16
+ data: ConnectionData;
17
+ };
18
+ sort(): Promise<void>;
19
+ getAll(): ConnectionData[];
20
+ setAll(connections: ConnectionData[]): Promise<void>;
21
+ storeNew(data: ConnectionData): Promise<{
22
+ index: number;
23
+ data: ConnectionData;
24
+ }>;
25
+ deleteByName(name: string): Promise<void>;
26
+ updateByIndex(index: number, data: ConnectionData): Promise<void>;
27
+ getConnectionSettings(): ConnectionConfig[];
28
+ updateAll(connections: ConnectionConfig[]): Promise<void>;
29
+ update(parameters: ConnectionConfig): Promise<void>;
30
+ load(name: string): Promise<ConnectionConfig>;
31
+ }
@@ -0,0 +1,9 @@
1
+ export declare abstract class Config {
2
+ abstract get<T>(key: string): T | undefined;
3
+ abstract set(key: string, value: any): Promise<void>;
4
+ }
5
+ export declare class VirtualConfig extends Config {
6
+ private readonly config;
7
+ get<T>(key: string): T | undefined;
8
+ set(key: string, value: any): Promise<void>;
9
+ }
@@ -0,0 +1,66 @@
1
+ import { FilterType } from "../../Filter";
2
+ import { DeploymentMethod, ConnectionData } from "../../types";
3
+ export declare type DefaultOpenMode = "browse" | "edit";
4
+ export declare type ReconnectMode = "always" | "never" | "ask";
5
+ export interface ConnectionConfig extends ConnectionProfile {
6
+ host: string;
7
+ autoClearTempData: boolean;
8
+ connectionProfiles: ConnectionProfile[];
9
+ commandProfiles: CommandProfile[];
10
+ autoSortIFSShortcuts: boolean;
11
+ tempLibrary: string;
12
+ tempDir: string;
13
+ sourceFileCCSID: string;
14
+ autoConvertIFSccsid: boolean;
15
+ hideCompileErrors: string[];
16
+ enableSourceDates: boolean;
17
+ sourceDateGutter: boolean;
18
+ encodingFor5250: string;
19
+ terminalFor5250: string;
20
+ setDeviceNameFor5250: boolean;
21
+ connectringStringFor5250: string;
22
+ autoSaveBeforeAction: boolean;
23
+ showDescInLibList: boolean;
24
+ debugPort: string;
25
+ debugSepPort: string;
26
+ debugUpdateProductionFiles: boolean;
27
+ debugEnableDebugTracing: boolean;
28
+ readOnlyMode: boolean;
29
+ quickConnect: boolean;
30
+ defaultDeploymentMethod: DeploymentMethod | '';
31
+ protectedPaths: string[];
32
+ showHiddenFiles: boolean;
33
+ lastDownloadLocation: string;
34
+ [name: string]: any;
35
+ }
36
+ export interface ObjectFilters {
37
+ name: string;
38
+ filterType: FilterType;
39
+ library: string;
40
+ object: string;
41
+ types: string[];
42
+ member: string;
43
+ memberType: string;
44
+ protected: boolean;
45
+ }
46
+ export interface CustomVariable {
47
+ name: string;
48
+ value: string;
49
+ }
50
+ export interface ConnectionProfile {
51
+ name: string;
52
+ homeDirectory: string;
53
+ currentLibrary: string;
54
+ libraryList: string[];
55
+ objectFilters: ObjectFilters[];
56
+ ifsShortcuts: string[];
57
+ customVariables: CustomVariable[];
58
+ }
59
+ export interface CommandProfile {
60
+ name: string;
61
+ command: string;
62
+ }
63
+ export interface StoredConnection {
64
+ index: number;
65
+ data: ConnectionData;
66
+ }
@@ -0,0 +1,11 @@
1
+ export declare abstract class BaseStorage {
2
+ protected readonly globalState: any;
3
+ constructor(globalState: any);
4
+ keys(): readonly string[];
5
+ get<T>(key: string): T | undefined;
6
+ set(key: string, value: any): Promise<void>;
7
+ getStorageKey(key: string): string;
8
+ }
9
+ export declare class VirtualStorage extends BaseStorage {
10
+ constructor();
11
+ }
@@ -0,0 +1,62 @@
1
+ import { AspInfo, ConnectionData } from "../../types";
2
+ import { ComponentInstallState } from "../../components/component";
3
+ import { BaseStorage } from "./BaseStorage";
4
+ export declare type PathContent = Record<string, string[]>;
5
+ export declare type DeploymentPath = Record<string, string>;
6
+ export declare type DebugCommands = Record<string, string>;
7
+ export declare type LastConnection = {
8
+ name: string;
9
+ timestamp: number;
10
+ };
11
+ export declare type CachedServerSettings = {
12
+ lastCheckedOnVersion: string | undefined;
13
+ iAspInfo: AspInfo[];
14
+ qccsid: number | null;
15
+ jobCcsid: number | null;
16
+ remoteFeatures: {
17
+ [name: string]: string | undefined;
18
+ };
19
+ installedComponents: ComponentInstallState[];
20
+ remoteFeaturesKeys: string | null;
21
+ badDataAreasChecked: boolean | null;
22
+ libraryListValidated: boolean | null;
23
+ pathChecked?: boolean;
24
+ userDefaultCCSID: number | null;
25
+ debugConfigLoaded: boolean;
26
+ maximumArgsLength: number;
27
+ } | undefined;
28
+ export declare class CodeForIStorage {
29
+ private internalStorage;
30
+ constructor(internalStorage: BaseStorage);
31
+ protected getStorageKey(key: string): string;
32
+ getLastConnections(): LastConnection[];
33
+ setLastConnection(name: string): Promise<void>;
34
+ setLastConnections(lastConnections: LastConnection[]): Promise<void>;
35
+ getServerSettingsCache(name: string): {
36
+ lastCheckedOnVersion: string;
37
+ iAspInfo: AspInfo[];
38
+ qccsid: number;
39
+ jobCcsid: number;
40
+ remoteFeatures: {
41
+ [name: string]: string;
42
+ };
43
+ installedComponents: ComponentInstallState[];
44
+ remoteFeaturesKeys: string;
45
+ badDataAreasChecked: boolean;
46
+ libraryListValidated: boolean;
47
+ pathChecked?: boolean;
48
+ userDefaultCCSID: number;
49
+ debugConfigLoaded: boolean;
50
+ maximumArgsLength: number;
51
+ };
52
+ setServerSettingsCache(name: string, serverSettings: CachedServerSettings): Promise<void>;
53
+ setServerSettingsCacheSpecific(name: string, newSettings: Partial<CachedServerSettings>): Promise<void>;
54
+ deleteServerSettingsCache(name: string): Promise<void>;
55
+ deleteStaleServerSettingsCache(connections: ConnectionData[]): Promise<void>;
56
+ getPreviousSearchTerms(): string[];
57
+ addPreviousSearchTerm(term: string): Promise<void>;
58
+ clearPreviousSearchTerms(): Promise<void>;
59
+ getPreviousFindTerms(): string[];
60
+ addPreviousFindTerm(term: string): Promise<void>;
61
+ clearPreviousFindTerms(): Promise<void>;
62
+ }
@@ -0,0 +1,36 @@
1
+ import { BaseStorage } from "./BaseStorage";
2
+ import { PathContent, DeploymentPath, DebugCommands } from "./CodeForIStorage";
3
+ declare type AuthorisedExtension = {
4
+ id: string;
5
+ displayName: string;
6
+ since: number;
7
+ lastAccess: number;
8
+ };
9
+ export declare class ConnectionStorage {
10
+ private internalStorage;
11
+ private connectionName;
12
+ constructor(internalStorage: BaseStorage);
13
+ get ready(): boolean;
14
+ setConnectionName(connectionName: string): void;
15
+ protected getStorageKey(key: string): string;
16
+ getSourceList(): PathContent;
17
+ setSourceList(sourceList: PathContent): Promise<void>;
18
+ getLastProfile(): string;
19
+ setLastProfile(lastProfile: string): Promise<void>;
20
+ getPreviousCurLibs(): string[];
21
+ setPreviousCurLibs(previousCurLibs: string[]): Promise<void>;
22
+ getDeployment(): DeploymentPath;
23
+ setDeployment(existingPaths: DeploymentPath): Promise<void>;
24
+ getDebugCommands(): DebugCommands;
25
+ setDebugCommands(existingCommands: DebugCommands): Promise<void>;
26
+ getWorkspaceDeployPath(workspaceFolderFsPath: string): string;
27
+ getRecentlyOpenedFiles(): string[];
28
+ setRecentlyOpenedFiles(recentlyOpenedFiles: string[]): Promise<void>;
29
+ clearRecentlyOpenedFiles(): Promise<void>;
30
+ grantExtensionAuthorisation(extensionId: string, displayName: string): Promise<void>;
31
+ getExtensionAuthorisation(extensionId: string): AuthorisedExtension;
32
+ getAuthorisedExtensions(): AuthorisedExtension[];
33
+ revokeAllExtensionAuthorisations(): void;
34
+ revokeExtensionAuthorisation(...extensions: AuthorisedExtension[]): Promise<void>;
35
+ }
36
+ export {};
@@ -1,2 +1,2 @@
1
- import { FileError } from "../../typings";
1
+ import { FileError } from "../types";
2
2
  export declare function parseErrors(lines: string[]): Map<string, FileError[]>;
@@ -0,0 +1 @@
1
+ export declare const ObjectTypes: Map<string, number>;
package/api/types.d.ts ADDED
@@ -0,0 +1,184 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ export declare type DeploymentMethod = "all" | "staged" | "unstaged" | "changed" | "compare";
4
+ export interface StandardIO {
5
+ onStdout?: (data: Buffer) => void;
6
+ onStderr?: (data: Buffer) => void;
7
+ stdin?: string;
8
+ }
9
+ /**
10
+ * External interface for extensions to call `code-for-ibmi.runCommand`
11
+ */
12
+ export declare type ActionType = "member" | "streamfile" | "object" | "file";
13
+ export declare type ActionRefresh = "no" | "parent" | "filter" | "browser";
14
+ export declare type ActionEnvironment = "ile" | "qsh" | "pase";
15
+ export declare type Variable = Record<string, string>;
16
+ export declare enum CcsidOrigin {
17
+ User = "user",
18
+ System = "system"
19
+ }
20
+ export interface RemoteCommand {
21
+ title?: string;
22
+ command: string;
23
+ environment?: ActionEnvironment;
24
+ cwd?: string;
25
+ env?: Record<string, string>;
26
+ noLibList?: boolean;
27
+ }
28
+ export interface CommandData extends StandardIO {
29
+ command: string;
30
+ directory?: string;
31
+ env?: Record<string, string>;
32
+ }
33
+ export interface CommandResult {
34
+ code: number;
35
+ stdout: string;
36
+ stderr: string;
37
+ command?: string;
38
+ }
39
+ export interface Action {
40
+ name: string;
41
+ command: string;
42
+ type?: ActionType;
43
+ environment: ActionEnvironment;
44
+ extensions?: string[];
45
+ deployFirst?: boolean;
46
+ postDownload?: string[];
47
+ refresh?: ActionRefresh;
48
+ runOnProtected?: boolean;
49
+ }
50
+ export interface ConnectionData {
51
+ name: string;
52
+ host: string;
53
+ port: number;
54
+ username: string;
55
+ password?: string;
56
+ privateKeyPath?: string;
57
+ keepaliveInterval?: number;
58
+ readyTimeout?: number;
59
+ }
60
+ export interface Server {
61
+ name: string;
62
+ }
63
+ export interface Profile {
64
+ profile: string;
65
+ }
66
+ export interface QsysPath {
67
+ asp?: string;
68
+ library: string;
69
+ name: string;
70
+ }
71
+ export interface IBMiObject extends QsysPath {
72
+ type: string;
73
+ text: string;
74
+ sourceFile?: boolean;
75
+ attribute?: string;
76
+ sourceLength?: number;
77
+ size?: number;
78
+ created?: Date;
79
+ changed?: Date;
80
+ created_by?: string;
81
+ owner?: string;
82
+ }
83
+ export interface IBMiMember {
84
+ library: string;
85
+ file: string;
86
+ name: string;
87
+ extension: string;
88
+ recordLength?: number;
89
+ text?: string;
90
+ asp?: string;
91
+ lines?: number;
92
+ created?: Date;
93
+ changed?: Date;
94
+ }
95
+ export interface IFSFile {
96
+ type: "directory" | "streamfile";
97
+ name: string;
98
+ path: string;
99
+ size?: number;
100
+ modified?: Date;
101
+ owner?: string;
102
+ }
103
+ export interface IBMiError {
104
+ code: string;
105
+ text: string;
106
+ }
107
+ export interface FileError {
108
+ sev: number;
109
+ lineNum: number;
110
+ toLineNum: number;
111
+ column: number;
112
+ toColumn: number;
113
+ text: string;
114
+ code: string;
115
+ }
116
+ export interface QsysFsOptions {
117
+ readonly?: boolean;
118
+ }
119
+ export declare type IBMiEvent = "connected" | "disconnected" | "deployLocation" | "deploy";
120
+ export interface WithPath {
121
+ path: string;
122
+ }
123
+ export interface WithLibrary {
124
+ library: string;
125
+ }
126
+ export declare type FocusOptions = {
127
+ select?: boolean;
128
+ focus?: boolean;
129
+ expand?: boolean | number;
130
+ };
131
+ export declare type IBMiMessage = {
132
+ id: string;
133
+ text: string;
134
+ };
135
+ export declare type IBMiMessages = {
136
+ messages: IBMiMessage[];
137
+ findId(id: string): IBMiMessage | undefined;
138
+ };
139
+ export declare const OBJECT_BROWSER_MIMETYPE = "application/vnd.code.tree.objectbrowser";
140
+ export declare const IFS_BROWSER_MIMETYPE = "application/vnd.code.tree.ifsbrowser";
141
+ export interface WrapResult {
142
+ newStatements: string[];
143
+ outStmf: string;
144
+ }
145
+ export declare type SpecialAuthorities = "*ALLOBJ" | "*AUDIT" | "*IOSYSCFG" | "*JOBCTL" | "*SAVSYS" | "*SECADM" | "*SERVICE" | "*SPLCTL";
146
+ 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';
147
+ export declare type SearchResults = {
148
+ term: string;
149
+ hits: SearchHit[];
150
+ };
151
+ export declare type SearchHit = {
152
+ path: string;
153
+ lines: SearchHitLine[];
154
+ readonly?: boolean;
155
+ label?: string;
156
+ };
157
+ export declare type SearchHitLine = {
158
+ number: number;
159
+ content: string;
160
+ };
161
+ export interface AspInfo {
162
+ id: number;
163
+ name: string;
164
+ type: string;
165
+ rdbName: string;
166
+ }
167
+ export interface ProgramExportImportInfo {
168
+ programLibrary: string;
169
+ programName: string;
170
+ objectType: string;
171
+ symbolName: string;
172
+ symbolUsage: string;
173
+ argumentOptimization: string;
174
+ dataItemSize: number;
175
+ }
176
+ export interface ModuleExport {
177
+ moduleLibrary: string;
178
+ moduleName: string;
179
+ moduleAttr: string;
180
+ symbolName: string;
181
+ symbolType: string;
182
+ argumentOptimization: string;
183
+ }
184
+ export * from "./configuration/config/types";
@@ -0,0 +1,3 @@
1
+ import { Disposable } from "vscode";
2
+ import Instance from "../Instance";
3
+ export declare function registerActionsCommands(instance: Instance): Disposable[];
@@ -0,0 +1,3 @@
1
+ import { Disposable } from "vscode";
2
+ import Instance from "../Instance";
3
+ export declare function registerCompareCommands(instance: Instance): Disposable[];
@@ -0,0 +1,3 @@
1
+ import { Disposable, ExtensionContext } from "vscode";
2
+ import Instance from "../Instance";
3
+ export declare function registerConnectionCommands(context: ExtensionContext, instance: Instance): Disposable[];
@@ -0,0 +1,7 @@
1
+ import { Disposable, Range } from "vscode";
2
+ import Instance from "../Instance";
3
+ import { QsysFsOptions } from "../typings";
4
+ export declare type OpenEditableOptions = QsysFsOptions & {
5
+ position?: Range;
6
+ };
7
+ export declare function registerOpenCommands(instance: Instance): Disposable[];
@@ -0,0 +1,3 @@
1
+ import { Disposable, ExtensionContext } from "vscode";
2
+ import Instance from "../Instance";
3
+ export declare function registerPasswordCommands(context: ExtensionContext, instance: Instance): Disposable[];
@@ -0,0 +1,9 @@
1
+ import * as vscode from 'vscode';
2
+ import { Config } from "../api/configuration/config/VirtualConfig";
3
+ export declare function onCodeForIBMiConfigurationChange<T>(props: string | string[], todo: (value: vscode.ConfigurationChangeEvent) => void): vscode.Disposable;
4
+ export declare class VsCodeConfig extends Config {
5
+ constructor();
6
+ private getWorkspaceConfig;
7
+ get<T>(key: string): T | undefined;
8
+ set(key: string, value: any): Promise<void>;
9
+ }
@@ -0,0 +1,10 @@
1
+ import * as vscode from 'vscode';
2
+ import { BaseStorage } from '../api/configuration/storage/BaseStorage';
3
+ export declare class VsStorage extends BaseStorage {
4
+ protected readonly globalState: vscode.Memento;
5
+ private connectionName;
6
+ constructor(context: vscode.ExtensionContext);
7
+ keys(): readonly string[];
8
+ get<T>(key: string): T | undefined;
9
+ set(key: string, value: any): Promise<void>;
10
+ }
@@ -0,0 +1,4 @@
1
+ import { ExtensionContext } from "vscode";
2
+ export declare function getStoredPassword(context: ExtensionContext, connectionName: string): Thenable<string>;
3
+ export declare function setStoredPassword(context: ExtensionContext, connectionName: string, password: string): Thenable<void>;
4
+ export declare function deleteStoredPassword(context: ExtensionContext, connectionName: string): Thenable<void>;
@@ -1,15 +1,12 @@
1
1
  import vscode from "vscode";
2
- import IBMi from "../IBMi";
3
- import IBMiContent from '../IBMiContent';
4
- import { DebugConfiguration } from './config';
2
+ import IBMi from "../api/IBMi";
3
+ import IBMiContent from '../api/IBMiContent';
4
+ import { DebugConfiguration } from '../api/configuration/DebugConfiguration';
5
5
  export declare type ImportedCertificate = {
6
6
  localFile?: vscode.Uri;
7
7
  remoteFile?: string;
8
8
  password: string;
9
9
  };
10
- export declare const SERVICE_CERTIFICATE = "debug_service.pfx";
11
- export declare const CLIENT_CERTIFICATE = "debug_service.crt";
12
- export declare const LEGACY_CERT_DIRECTORY = "/QIBM/ProdData/IBMiDebugService/bin/certs";
13
10
  /**
14
11
  * Generates or imports the debug service server certificate and generates the client certificate from it.
15
12
  * The keystore containing the certificate and its key must use the PKCS12 format.
@@ -1,6 +1,6 @@
1
1
  import { ExtensionContext } from "vscode";
2
2
  import Instance from "../Instance";
3
- import { ILELibrarySettings } from "../CompileTools";
3
+ import { ILELibrarySettings } from "../api/CompileTools";
4
4
  export declare function isManaged(): boolean;
5
5
  export declare function initialize(context: ExtensionContext): Promise<void>;
6
6
  interface DebugOptions {
@@ -1,11 +1,11 @@
1
- import IBMi from "../IBMi";
2
- import { Tools } from "../Tools";
1
+ import IBMi from "../api/IBMi";
2
+ import { Tools } from "../api/Tools";
3
3
  export declare type DebugJob = {
4
4
  name: string;
5
5
  ports: number[];
6
6
  };
7
7
  export declare function debugPTFInstalled(): boolean;
8
- export declare function isSEPSupported(): Promise<boolean>;
8
+ export declare function isSEPSupported(connection: IBMi): Promise<boolean>;
9
9
  export declare function startService(connection: IBMi): Promise<boolean>;
10
10
  export declare function stopService(connection: IBMi): Promise<boolean>;
11
11
  export declare function getDebugServiceJob(): Promise<DebugJob>;
@@ -14,7 +14,7 @@ export declare function getDebugServerJob(): Promise<DebugJob>;
14
14
  * Gets a list of debug jobs stuck at MSGW in QSYSWRK
15
15
  */
16
16
  export declare function getStuckJobs(connection: IBMi): Promise<string[]>;
17
- export declare function endJobs(jobIds: string[], connection: IBMi): Promise<import("../../typings").CommandResult[]>;
17
+ export declare function endJobs(jobIds: string[], connection: IBMi): Promise<import("../typings").CommandResult[]>;
18
18
  export declare function isDebugEngineRunning(): Promise<boolean>;
19
19
  export declare function startServer(): Promise<boolean>;
20
20
  export declare function stopServer(): Promise<boolean>;
@@ -0,0 +1,27 @@
1
+ import vscode from "vscode";
2
+ export declare class IFSFS implements vscode.FileSystemProvider {
3
+ private readonly savedAsFiles;
4
+ private emitter;
5
+ onDidChangeFile: vscode.Event<vscode.FileChangeEvent[]>;
6
+ watch(uri: vscode.Uri, options: {
7
+ readonly recursive: boolean;
8
+ readonly excludes: readonly string[];
9
+ }): vscode.Disposable;
10
+ readFile(uri: vscode.Uri, retrying?: boolean): Promise<Uint8Array>;
11
+ stat(uri: vscode.Uri): Promise<vscode.FileStat>;
12
+ writeFile(uri: vscode.Uri, content: Uint8Array, options: {
13
+ readonly create: boolean;
14
+ readonly overwrite: boolean;
15
+ }): Promise<void>;
16
+ copy(source: vscode.Uri, destination: vscode.Uri, options: {
17
+ readonly overwrite: boolean;
18
+ }): void | Thenable<void>;
19
+ rename(oldUri: vscode.Uri, newUri: vscode.Uri, options: {
20
+ readonly overwrite: boolean;
21
+ }): void | Thenable<void>;
22
+ readDirectory(uri: vscode.Uri): Promise<[string, vscode.FileType][]>;
23
+ createDirectory(uri: vscode.Uri): Promise<void>;
24
+ delete(uri: vscode.Uri, options: {
25
+ readonly recursive: boolean;
26
+ }): void | Thenable<void>;
27
+ }
@@ -1,4 +1,4 @@
1
1
  import { WorkspaceFolder } from "vscode";
2
- import { Action } from "../../typings";
2
+ import { Action } from "../../api/types";
3
3
  export declare function getLocalActions(currentWorkspace: WorkspaceFolder): Promise<Action[]>;
4
4
  export declare function getEvfeventFiles(currentWorkspace: WorkspaceFolder): Promise<import("vscode").Uri[]>;
@@ -1,6 +1,7 @@
1
1
  import { Ignore } from 'ignore';
2
2
  import vscode, { Uri, WorkspaceFolder } from 'vscode';
3
- import { DeploymentMethod, DeploymentParameters } from '../../typings';
3
+ import { DeploymentMethod } from '../../api/types';
4
+ import { DeploymentParameters } from '../../typings';
4
5
  declare type ServerFileChanges = {
5
6
  uploads: Uri[];
6
7
  relativeRemoteDeletes: string[];
@@ -1,6 +1,6 @@
1
1
  import vscode from 'vscode';
2
+ import IBMi from '../../api/IBMi';
2
3
  import { DeploymentParameters } from '../../typings';
3
- import IBMi from '../IBMi';
4
4
  export declare namespace Deployment {
5
5
  interface MD5Entry {
6
6
  path: string;
@@ -13,7 +13,7 @@ export declare namespace Deployment {
13
13
  const workspaceChanges: Map<vscode.WorkspaceFolder, Map<string, vscode.Uri>>;
14
14
  function initialize(context: vscode.ExtensionContext): void;
15
15
  function getConnection(): IBMi;
16
- function getContent(): import("../IBMiContent").default;
16
+ function getContent(): import("../../api/IBMiContent").default;
17
17
  function createRemoteDirectory(remotePath: string): Promise<import("../../typings").CommandResult>;
18
18
  function showErrorButton(): Promise<void>;
19
19
  function getWorkspaceFolder(workspaceIndex?: number): Promise<vscode.WorkspaceFolder>;
@@ -0,0 +1,9 @@
1
+ import vscode from "vscode";
2
+ /**
3
+ * Called when a member/streamfile is left open when VS Code is closed and re-opened to reconnect (or not) to the previous IBM i, based on the `autoReconnect` global configuration value.
4
+ * If the user choses not to reconnect, the editor tab will be closed.
5
+ *
6
+ * @param uri the uri of the file triggerring the reconnection attempt
7
+ * @returns `true` if the user choses to reconnect, `false` otherwise.
8
+ */
9
+ export declare function reconnectFS(uri: vscode.Uri): Promise<boolean>;
@@ -0,0 +1,40 @@
1
+ import vscode, { FilePermission } from "vscode";
2
+ import IBMi from "../../api/IBMi";
3
+ import { IBMiMember, QsysFsOptions, QsysPath } from "../../typings";
4
+ export declare function getMemberUri(member: IBMiMember, options?: QsysFsOptions): vscode.Uri;
5
+ export declare function getUriFromPath(path: string, options?: QsysFsOptions): vscode.Uri;
6
+ export declare function getFilePermission(uri: vscode.Uri): FilePermission | undefined;
7
+ export declare function parseFSOptions(uri: vscode.Uri): QsysFsOptions;
8
+ export declare function isProtectedFilter(filter?: string): boolean;
9
+ export declare class QSysFS implements vscode.FileSystemProvider {
10
+ private readonly savedAsMembers;
11
+ private readonly sourceDateHandler;
12
+ private readonly extendedContent;
13
+ private extendedMemberSupport;
14
+ private emitter;
15
+ onDidChangeFile: vscode.Event<vscode.FileChangeEvent[]>;
16
+ constructor(context: vscode.ExtensionContext);
17
+ private updateMemberSupport;
18
+ stat(uri: vscode.Uri): Promise<vscode.FileStat>;
19
+ getMemberAttributes(connection: IBMi, path: QsysPath & {
20
+ member?: string;
21
+ }): Promise<Record<string, string>>;
22
+ parseMemberPath(connection: IBMi, path: string): import("../../api/IBMi").MemberParts;
23
+ readFile(uri: vscode.Uri, retrying?: boolean): Promise<Uint8Array>;
24
+ writeFile(uri: vscode.Uri, content: Uint8Array, options: {
25
+ readonly create: boolean;
26
+ readonly overwrite: boolean;
27
+ }): Promise<void>;
28
+ rename(oldUri: vscode.Uri, newUri: vscode.Uri, options: {
29
+ readonly overwrite: boolean;
30
+ }): void | Thenable<void>;
31
+ watch(uri: vscode.Uri, options: {
32
+ readonly recursive: boolean;
33
+ readonly excludes: readonly string[];
34
+ }): vscode.Disposable;
35
+ readDirectory(uri: vscode.Uri): Promise<[string, vscode.FileType][]>;
36
+ createDirectory(uri: vscode.Uri): Promise<void>;
37
+ delete(uri: vscode.Uri, options: {
38
+ readonly recursive: boolean;
39
+ }): void | Thenable<void>;
40
+ }