@halcyontech/vscode-ibmi-types 2.16.1 → 2.16.3

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.
package/api/IBMi.d.ts CHANGED
@@ -1,15 +1,16 @@
1
1
  /// <reference types="node" />
2
2
  import * as node_ssh from "node-ssh";
3
- import { IBMiComponent } from "./components/component";
4
- import { ComponentManager, ComponentSearchProps } from "./components/manager";
3
+ import { EventEmitter } from 'stream';
4
+ import { EditorPath } from '../typings';
5
5
  import IBMiContent from "./IBMiContent";
6
- import { CodeForIStorage } from './configuration/storage/CodeForIStorage';
7
6
  import { Tools } from './Tools';
7
+ import { IBMiComponent } from "./components/component";
8
+ import { ComponentManager, ComponentSearchProps } from "./components/manager";
8
9
  import { ConnectionManager } from './configuration/config/ConnectionManager';
10
+ import { ConnectionConfig, RemoteConfigFile } from './configuration/config/types';
11
+ import { CodeForIStorage } from './configuration/storage/CodeForIStorage';
9
12
  import { AspInfo, CommandData, CommandResult, ConnectionData, IBMiMember, RemoteCommand } from './types';
10
- import { EventEmitter } from 'stream';
11
- import { ConnectionConfig } from './configuration/config/types';
12
- import { EditorPath } from '../typings';
13
+ import { ConfigFile } from './configuration/serverFile';
13
14
  export interface MemberParts extends IBMiMember {
14
15
  basename: string;
15
16
  }
@@ -30,6 +31,9 @@ interface ConnectionCallbacks {
30
31
  message: (type: ConnectionMessageType, message: string) => void;
31
32
  cancelEmitter?: EventEmitter;
32
33
  }
34
+ interface ConnectionConfigFiles {
35
+ settings: ConfigFile<RemoteConfigFile>;
36
+ }
33
37
  export default class IBMi {
34
38
  static GlobalStorage: CodeForIStorage;
35
39
  static connectionManager: ConnectionManager;
@@ -44,6 +48,7 @@ export default class IBMi {
44
48
  private userDefaultCCSID;
45
49
  private sshdCcsid;
46
50
  private componentManager;
51
+ private configFiles;
47
52
  /**
48
53
  * @deprecated Will become private in v3.0.0 - use {@link IBMi.getConfig} instead.
49
54
  */
@@ -89,6 +94,7 @@ export default class IBMi {
89
94
  * Will only be called once per connection.
90
95
  */
91
96
  setDisconnectedCallback(callback: DisconnectCallback): void;
97
+ getConfigFile<T>(id: keyof ConnectionConfigFiles): ConfigFile<T>;
92
98
  get canUseCqsh(): boolean;
93
99
  /**
94
100
  * Primarily used for running SQL statements.
@@ -117,6 +123,7 @@ export default class IBMi {
117
123
  */
118
124
  getSystemVersion(): number;
119
125
  usingBash(): boolean;
126
+ loadRemoteConfigs(): Promise<void>;
120
127
  /**
121
128
  * - Send PASE/QSH/ILE commands simply
122
129
  * - Commands sent here end in the 'IBM i Output' channel
@@ -227,12 +227,12 @@ export default class IBMiContent {
227
227
  uploadDirectory(localDirectory: EditorPath, remoteDirectory: string, options?: node_ssh.SSHGetPutDirectoryOptions): Promise<boolean>;
228
228
  downloadDirectory(localDirectory: EditorPath, remoteDirectory: string, options?: node_ssh.SSHGetPutDirectoryOptions): Promise<boolean>;
229
229
  /**
230
- * Copy one or more folders or files into a directory. Uses QSH's `cp` to keep all the attributes of the original file into its copy.
230
+ * Copy one or more folders or files into a directory or file. Uses ILE `CPY` to keep all the attributes of the original file into its copy.
231
231
  * @param paths one or more files/folders to copy
232
- * @param toDirectory the directory where the files/folders will be copied into
233
- * @returns the {@link CommandResult} of the `cp` command execution
232
+ * @param toPath the directory or file where the files/folders will be copied into
233
+ * @returns the {@link CommandResult} of the `CPY` command execution
234
234
  */
235
- copy(paths: string | string[], toDirectory: string): Promise<CommandResult>;
235
+ copy(paths: string | string[], toPath: string): Promise<CommandResult>;
236
236
  /**
237
237
  * Move one or more folders or files into a directory. Uses QSH's `mv` to ensures attributes are not altered during the opration.
238
238
  * @param paths one or more files/folders to copy
@@ -33,6 +33,9 @@ export interface ConnectionConfig extends ConnectionProfile {
33
33
  lastDownloadLocation: string;
34
34
  [name: string]: any;
35
35
  }
36
+ export interface RemoteConfigFile {
37
+ codefori?: Partial<ConnectionConfig>;
38
+ }
36
39
  export interface ObjectFilters {
37
40
  name: string;
38
41
  filterType: FilterType;
@@ -0,0 +1,23 @@
1
+ import IBMi from "../IBMi";
2
+ declare type ConfigResult = `not_loaded` | `no_exist` | `failed_to_parse` | `invalid` | `ok`;
3
+ interface LoadResult {
4
+ server: ConfigResult;
5
+ }
6
+ export declare class ConfigFile<T> {
7
+ private connection;
8
+ readonly fallback: T;
9
+ private state;
10
+ private basename;
11
+ private serverFile;
12
+ private serverData;
13
+ validateData: ((loadedConfig: any) => T) | undefined;
14
+ constructor(connection: IBMi, configId: string, fallback: T);
15
+ getPaths(): {
16
+ server: string;
17
+ };
18
+ loadFromServer(): Promise<void>;
19
+ get(): Promise<T>;
20
+ reset(): void;
21
+ getState(): LoadResult;
22
+ }
23
+ export {};
package/api/types.d.ts CHANGED
@@ -32,6 +32,7 @@ export interface CommandData extends StandardIO {
32
32
  }
33
33
  export interface CommandResult {
34
34
  code: number;
35
+ signal?: string | null;
35
36
  stdout: string;
36
37
  stderr: string;
37
38
  command?: string;
@@ -3,12 +3,14 @@ export declare class SourceDateHandler {
3
3
  readonly baseDates: Map<string, string[]>;
4
4
  readonly baseSource: Map<string, string>;
5
5
  readonly recordLengths: Map<string, number>;
6
+ readonly baseSequences: Map<string, number[]>;
6
7
  private enabled;
7
8
  private timeout?;
8
9
  private readonly timeoutDelay;
9
10
  private highlightSince?;
10
11
  private highlightBefore?;
11
12
  private lineEditedBefore?;
13
+ private sequenceNumbersShowing;
12
14
  private readonly sourceDateSearchBarItem;
13
15
  constructor(context: vscode.ExtensionContext);
14
16
  setEnabled(enabled: boolean): void;
@@ -20,6 +22,7 @@ export declare class SourceDateHandler {
20
22
  private _diffRefreshGutter;
21
23
  calcNewSourceDates(alias: string, body: string): string[];
22
24
  private toggleSourceDateGutter;
25
+ private toggleSequenceNumbers;
23
26
  private clearDateSearch;
24
27
  private newDateSearch;
25
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@halcyontech/vscode-ibmi-types",
3
- "version": "2.16.1",
3
+ "version": "2.16.3",
4
4
  "description": "Types for vscode-ibmi",
5
5
  "typings": "./typings.d.ts",
6
6
  "scripts": {