@halcyontech/vscode-ibmi-types 1.8.0 → 1.9.1

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,6 +1,6 @@
1
1
  import vscode from 'vscode';
2
- import Instance from './Instance';
3
2
  import { CommandResult, RemoteCommand } from '../typings';
3
+ import Instance from './Instance';
4
4
  export interface ILELibrarySettings {
5
5
  currentLibrary: string;
6
6
  libraryList: string[];
package/api/IBMi.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import * as vscode from "vscode";
2
1
  import * as node_ssh from "node-ssh";
2
+ import * as vscode from "vscode";
3
3
  import { ConnectionConfiguration } from "./Configuration";
4
- import { ConnectionData, CommandData, StandardIO, CommandResult, IBMiMember, RemoteCommand } from "../typings";
4
+ import { CommandData, CommandResult, ConnectionData, IBMiMember, RemoteCommand, StandardIO } from "../typings";
5
5
  export interface MemberParts extends IBMiMember {
6
6
  basename: string;
7
7
  }
@@ -1,6 +1,6 @@
1
+ import { IBMiError, IBMiFile, IBMiMember, IBMiObject, IFSFile, QsysPath } from '../typings';
1
2
  import { default as IBMi } from './IBMi';
2
3
  import { Tools } from './Tools';
3
- import { IBMiError, IBMiFile, IBMiMember, IBMiObject, IFSFile } from '../typings';
4
4
  export declare type SortOptions = {
5
5
  order: "name" | "date" | "?";
6
6
  ascending?: boolean;
@@ -78,6 +78,9 @@ export default class IBMiContent {
78
78
  * @return an array of IFSFile
79
79
  */
80
80
  getFileList(remotePath: string, sort?: SortOptions): Promise<IFSFile[]>;
81
+ memberResolve(member: string, files: QsysPath[]): Promise<IBMiMember | undefined>;
82
+ objectResolve(object: string, libraries: string[]): Promise<string | undefined>;
83
+ streamfileResolve(name: string, directories: string[]): Promise<string | undefined>;
81
84
  /**
82
85
  * Fix Comments in an SQL string so that the comments always start at position 0 of the line.
83
86
  * Required to work with QZDFMDB2.
@@ -90,4 +93,17 @@ export default class IBMiContent {
90
93
  * @returns errors
91
94
  */
92
95
  parseIBMiErrors(errorsString: string): IBMiError[];
96
+ /**
97
+ * @param century; century code (1=20xx, 0=19xx)
98
+ * @param dateString: string in YYMMDD
99
+ * @param timeString: string in HHMMSS
100
+ * @returns date
101
+ */
102
+ getDspfdDate(century?: string, YYMMDD?: string, HHMMSS?: string): Date;
103
+ /**
104
+ * Return `true` if `remotePath` denotes a directory
105
+ *
106
+ * @param remotePath: a remote IFS path
107
+ */
108
+ isDirectory(remotePath: string): Promise<boolean>;
93
109
  }
package/api/Storage.d.ts CHANGED
@@ -21,6 +21,7 @@ export declare type CachedServerSettings = {
21
21
  remoteFeatures: {
22
22
  [name: string]: string | undefined;
23
23
  };
24
+ remoteFeaturesKeys: string | null;
24
25
  variantChars: {
25
26
  american: string;
26
27
  local: string;
@@ -44,6 +45,7 @@ export declare class GlobalStorage extends Storage {
44
45
  remoteFeatures: {
45
46
  [name: string]: string;
46
47
  };
48
+ remoteFeaturesKeys: string;
47
49
  variantChars: {
48
50
  american: string;
49
51
  local: string;
package/api/Terminal.d.ts CHANGED
@@ -1,4 +1,9 @@
1
+ import vscode from 'vscode';
1
2
  import Instance from './Instance';
2
3
  export declare namespace Terminal {
3
- function selectAndOpen(instance: Instance): void;
4
+ enum TerminalType {
5
+ PASE = "PASE",
6
+ _5250 = "5250"
7
+ }
8
+ function selectAndOpen(instance: Instance, openType?: TerminalType): Promise<vscode.Terminal>;
4
9
  }
package/api/Tools.d.ts CHANGED
@@ -26,10 +26,15 @@ export declare namespace Tools {
26
26
  * @param iasp Optional: an iASP name
27
27
  */
28
28
  function qualifyPath(library: string, object: string, member: string, iasp?: string): string;
29
+ /**
30
+ * Unqualify member path from root
31
+ */
32
+ function unqualifyPath(memberPath: string): string;
29
33
  /**
30
34
  * @param Path
31
35
  * @returns the escaped path
32
36
  */
33
37
  function escapePath(Path: string): string;
34
38
  function getGitAPI(): API | undefined;
39
+ function distinct(value: any, index: number, array: any[]): boolean;
35
40
  }
@@ -1,6 +1,7 @@
1
1
  import IBMi from "../IBMi";
2
2
  import IBMiContent from "../IBMiContent";
3
3
  export declare function startup(connection: IBMi): Promise<void>;
4
+ export declare function stop(connection: IBMi): Promise<void>;
4
5
  export declare function getRunningJob(localPort: string, content: IBMiContent): Promise<string | undefined>;
5
6
  export declare function end(connection: IBMi): Promise<void>;
6
7
  /**
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@halcyontech/vscode-ibmi-types",
3
- "version": "1.8.0",
3
+ "version": "1.9.1",
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",
7
+ "prepublish": "rm -rf filesystems schemas views webviews languages testing",
8
8
  "deploy": "npm publish --access public"
9
9
  },
10
10
  "repository": {
package/typings.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import { Uri } from "vscode";
2
+ import { WorkspaceFolder } from "vscode";
3
3
  import Instance from "./api/Instance";
4
4
  import { Ignore } from 'ignore';
5
5
  import { CustomUI } from "./api/CustomUI";
@@ -12,7 +12,7 @@ export interface CodeForIBMi {
12
12
  export declare type DeploymentMethod = "all" | "staged" | "unstaged" | "changed" | "compare";
13
13
  export interface DeploymentParameters {
14
14
  method: DeploymentMethod;
15
- localFolder: Uri;
15
+ workspaceFolder: WorkspaceFolder;
16
16
  remotePath: string;
17
17
  ignoreRules?: Ignore;
18
18
  }
@@ -65,9 +65,11 @@ export interface Server {
65
65
  export interface Profile {
66
66
  profile: string;
67
67
  }
68
- export interface IBMiObject {
68
+ export interface QsysPath {
69
69
  library: string;
70
70
  name: string;
71
+ }
72
+ export interface IBMiObject extends QsysPath {
71
73
  type: string;
72
74
  text: string;
73
75
  attribute?: string;
@@ -80,15 +82,20 @@ export interface IBMiMember {
80
82
  file: string;
81
83
  name: string;
82
84
  extension: string;
83
- changed: string;
84
85
  recordLength?: number;
85
86
  text?: string;
86
87
  asp?: string;
88
+ lines?: number;
89
+ created?: Date;
90
+ changed?: Date;
87
91
  }
88
92
  export interface IFSFile {
89
93
  type: "directory" | "streamfile";
90
94
  name: string;
91
95
  path: string;
96
+ size?: number;
97
+ modified?: Date | string;
98
+ owner?: string;
92
99
  }
93
100
  export interface IBMiError {
94
101
  code: string;
@@ -109,4 +116,7 @@ export interface FileError {
109
116
  export interface QsysFsOptions {
110
117
  readonly?: boolean;
111
118
  }
112
- export declare type IBMiEvent = "connected" | "disconnected" | "deployLocation";
119
+ export declare type IBMiEvent = "connected" | "disconnected" | "deployLocation" | "deploy";
120
+ export interface Library {
121
+ path: string;
122
+ }
@@ -1,2 +0,0 @@
1
- import { TestSuite } from ".";
2
- export declare const ConnectionSuite: TestSuite;
@@ -1,2 +0,0 @@
1
- import { TestSuite } from ".";
2
- export declare const ContentSuite: TestSuite;
@@ -1,12 +0,0 @@
1
- import vscode from "vscode";
2
- export declare type TestSuite = {
3
- name: string;
4
- tests: TestCase[];
5
- };
6
- export interface TestCase {
7
- name: string;
8
- status?: "running" | "failed" | "pass";
9
- failure?: string;
10
- test: () => Promise<void>;
11
- }
12
- export declare function initialise(context: vscode.ExtensionContext): void;
@@ -1,21 +0,0 @@
1
- import vscode from "vscode";
2
- import { TestCase, TestSuite } from ".";
3
- export declare class TestSuitesTreeProvider implements vscode.TreeDataProvider<vscode.TreeItem> {
4
- readonly testSuites: TestSuite[];
5
- private readonly emitter;
6
- readonly onDidChangeTreeData: vscode.Event<void | vscode.TreeItem | vscode.TreeItem[] | null | undefined>;
7
- constructor(testSuites: TestSuite[]);
8
- refresh(element?: TestSuiteItem): void;
9
- getTreeItem(element: vscode.TreeItem): vscode.TreeItem | Thenable<vscode.TreeItem>;
10
- getChildren(element?: TestSuiteItem): vscode.ProviderResult<vscode.TreeItem[]>;
11
- }
12
- declare class TestSuiteItem extends vscode.TreeItem {
13
- readonly testSuite: TestSuite;
14
- constructor(testSuite: TestSuite);
15
- getChilren(): TestCaseItem[];
16
- }
17
- declare class TestCaseItem extends vscode.TreeItem {
18
- readonly testCase: TestCase;
19
- constructor(suiteName: string, testCase: TestCase);
20
- }
21
- export {};