Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose Tools namespace in CodeForIBMi API #1436

Merged
merged 2 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { ProfilesView } from "./views/ProfilesView";
import { HelpView } from "./views/helpView";
import IFSBrowser from "./views/ifsBrowser";
import ObjectBrowser from "./views/objectBrowser";
import { Tools } from "./api/Tools";
import { DeployTools } from "./api/local/deployTools";

export async function activate(context: ExtensionContext): Promise<CodeForIBMi> {
Expand Down Expand Up @@ -113,7 +114,7 @@ export async function activate(context: ExtensionContext): Promise<CodeForIBMi>
]);
});

return { instance, customUI: () => new CustomUI(), deployTools: DeployTools, evfeventParser: parseErrors };
return { instance, customUI: () => new CustomUI(), deployTools: DeployTools, evfeventParser: parseErrors, tools: Tools };
}

// this method is called when your extension is deactivated
Expand Down
4 changes: 3 additions & 1 deletion src/typings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ import { WorkspaceFolder } from "vscode";
import Instance from "./api/Instance";
import { Ignore } from 'ignore'
import { CustomUI } from "./api/CustomUI";
import { Tools } from "./api/Tools";
import { DeployTools } from "./api/local/deployTools";

export interface CodeForIBMi {
instance: Instance,
customUI: () => CustomUI,
deployTools: typeof DeployTools,
evfeventParser: (lines: string[]) => Map<string, FileError[]>
evfeventParser: (lines: string[]) => Map<string, FileError[]>,
tools: typeof Tools
}

export type DeploymentMethod = "all" | "staged" | "unstaged" | "changed" | "compare";
Expand Down