@halcyontech/vscode-ibmi-types 2.8.0 → 2.9.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.
@@ -33,6 +33,7 @@ export declare namespace ConnectionConfiguration {
33
33
  showDescInLibList: boolean;
34
34
  debugCertDirectory: string;
35
35
  debugPort: string;
36
+ debugSepPort: string;
36
37
  debugIsSecure: boolean;
37
38
  debugUpdateProductionFiles: boolean;
38
39
  debugEnableDebugTracing: boolean;
package/api/IBMi.d.ts CHANGED
@@ -30,7 +30,9 @@ export default class IBMi {
30
30
  };
31
31
  lastErrors: object[];
32
32
  config?: ConnectionConfiguration.Parameters;
33
+ shell?: string;
33
34
  commandsExecuted: number;
35
+ dangerousVariants: boolean;
34
36
  constructor();
35
37
  /**
36
38
  * @returns {Promise<{success: boolean, error?: any}>} Was succesful at connecting or not.
@@ -39,6 +41,7 @@ export default class IBMi {
39
41
  success: boolean;
40
42
  error?: any;
41
43
  }>;
44
+ usingBash(): boolean;
42
45
  /**
43
46
  * - Send PASE/QSH/ILE commands simply
44
47
  * - Commands sent here end in the 'IBM i Output' channel
@@ -89,4 +92,9 @@ export default class IBMi {
89
92
  * @param process the process that will run on the empty directory
90
93
  */
91
94
  withTempDirectory(process: (directory: string) => Promise<void>): Promise<void>;
95
+ /**
96
+ * Uppercases an object name, keeping the variant chars case intact
97
+ * @param name
98
+ */
99
+ upperCaseName(name: string): string;
92
100
  }
@@ -46,6 +46,11 @@ export default class IBMiContent {
46
46
  * Upload to a member
47
47
  */
48
48
  uploadMemberContent(asp: string | undefined, library: string, sourceFile: string, member: string, content: string | Uint8Array): Promise<boolean>;
49
+ /**
50
+ * @param statements Either an SQL statement or CL statement. CL statements start with @
51
+ * @returns result set
52
+ */
53
+ runStatements(...statements: string[]): Promise<Tools.DB2Row[]>;
49
54
  /**
50
55
  * Run SQL statements.
51
56
  * Each statement must be separated by a semi-colon and a new line (i.e. ;\n).
@@ -158,7 +163,7 @@ export default class IBMiContent {
158
163
  * @param parameters A key/value object of parameters
159
164
  * @returns Formatted CL string
160
165
  */
161
- static toCl(command: string, parameters: {
166
+ toCl(command: string, parameters: {
162
167
  [parameter: string]: string | number | undefined;
163
168
  }): string;
164
169
  }
package/api/Storage.d.ts CHANGED
@@ -2,6 +2,12 @@ import vscode from 'vscode';
2
2
  export declare type PathContent = Record<string, string[]>;
3
3
  export declare type DeploymentPath = Record<string, string>;
4
4
  export declare type DebugCommands = Record<string, string>;
5
+ declare type AuthorisedExtension = {
6
+ id: string;
7
+ displayName: string;
8
+ since: number;
9
+ lastAccess: number;
10
+ };
5
11
  declare abstract class Storage {
6
12
  protected readonly globalState: any;
7
13
  constructor(context: vscode.ExtensionContext);
@@ -84,5 +90,10 @@ export declare class ConnectionStorage extends Storage {
84
90
  getRecentlyOpenedFiles(): string[];
85
91
  setRecentlyOpenedFiles(recentlyOpenedFiles: string[]): Promise<void>;
86
92
  clearRecentlyOpenedFiles(): Promise<void>;
93
+ grantExtensionAuthorisation(extension: vscode.Extension<any>): Promise<void>;
94
+ getExtensionAuthorisation(extension: vscode.Extension<any>): AuthorisedExtension;
95
+ getAuthorisedExtensions(): AuthorisedExtension[];
96
+ revokeAllExtensionAuthorisations(): void;
97
+ revokeExtensionAuthorisation(...extensions: AuthorisedExtension[]): Promise<void>;
87
98
  }
88
99
  export {};
@@ -1,8 +1,9 @@
1
1
  import IBMi from "../IBMi";
2
- export declare function getRemoteServerCertPath(connection: IBMi): string;
3
- export declare function getRemoteClientCertPath(connection: IBMi): string;
4
- export declare function remoteServerCertExists(connection: IBMi): Promise<boolean>;
5
- export declare function remoteClientCertExists(connection: IBMi): Promise<boolean>;
2
+ export declare const LEGACY_CERT_DIRECTORY = "/QIBM/ProdData/IBMiDebugService/bin/certs";
3
+ export declare const DEFAULT_CERT_DIRECTORY = "/QIBM/UserData/IBMiDebugService/certs";
4
+ export declare function getRemoteCertificateDirectory(connection: IBMi): string;
5
+ export declare function getRemoteServerCertificatePath(connection: IBMi): string;
6
+ export declare function remoteServerCertificateExists(connection: IBMi, legacy?: boolean): Promise<boolean>;
6
7
  /**
7
8
  * Generate all certifcates on the server
8
9
  */
@@ -10,3 +11,4 @@ export declare function setup(connection: IBMi): Promise<void>;
10
11
  export declare function downloadClientCert(connection: IBMi): Promise<void>;
11
12
  export declare function getLocalCertPath(connection: IBMi): string;
12
13
  export declare function localClientCertExists(connection: IBMi): Promise<boolean>;
14
+ export declare function legacyCertificateChecks(connection: IBMi, existingDebugService: string | undefined): Promise<void>;
@@ -8,6 +8,12 @@ interface DebugOptions {
8
8
  library: string;
9
9
  object: string;
10
10
  libraries: ILELibrarySettings;
11
+ sep?: {
12
+ type: DebugObjectType;
13
+ moduleName?: string;
14
+ procedureName?: string;
15
+ };
11
16
  }
17
+ declare type DebugObjectType = "*PGM" | "*SRVPGM";
12
18
  export declare function startDebug(instance: Instance, options: DebugOptions): Promise<void>;
13
19
  export {};
@@ -1,11 +1,19 @@
1
1
  import IBMi from "../IBMi";
2
2
  import IBMiContent from "../IBMiContent";
3
- export declare function startup(connection: IBMi): Promise<void>;
4
- export declare function stop(connection: IBMi): Promise<void>;
3
+ import Instance from "../Instance";
4
+ interface DebugServiceDetails {
5
+ version: string;
6
+ java: string;
7
+ }
8
+ export declare function resetDebugServiceDetails(): void;
9
+ export declare function getDebugServiceDetails(content: IBMiContent): Promise<DebugServiceDetails>;
10
+ export declare function startup(instance: Instance): Promise<void>;
11
+ export declare function stop(instance: Instance): Promise<void>;
5
12
  export declare function getRunningJob(localPort: string, content: IBMiContent): Promise<string | undefined>;
6
- export declare function end(connection: IBMi): Promise<void>;
13
+ export declare function end(instance: Instance): Promise<void>;
7
14
  /**
8
15
  * Gets a list of debug jobs stuck at MSGW in QSYSWRK
9
16
  */
10
17
  export declare function getStuckJobs(userProfile: string, content: IBMiContent): Promise<string[]>;
11
18
  export declare function endJobs(jobIds: string[], connection: IBMi): Promise<import("../../typings").CommandResult[]>;
19
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@halcyontech/vscode-ibmi-types",
3
- "version": "2.8.0",
3
+ "version": "2.9.0",
4
4
  "description": "Types for vscode-ibmi",
5
5
  "typings": "./typings.d.ts",
6
6
  "scripts": {
package/typings.d.ts CHANGED
@@ -136,7 +136,8 @@ export declare type IBMiEvent = "connected" | "disconnected" | "deployLocation"
136
136
  export interface WithPath {
137
137
  path: string;
138
138
  }
139
- export interface Library extends WithPath {
139
+ export interface WithLibrary {
140
+ library: string;
140
141
  }
141
142
  export declare type FocusOptions = {
142
143
  select?: boolean;