Skip to content
Draft
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
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@
"editor.insertSpaces": true,
"editor.formatOnSave": true,
"typescript.tsc.autoDetect": "off",
"typescript.preferences.quoteStyle": "single"
"typescript.preferences.quoteStyle": "single",
"[powershell]": {
"editor.defaultFormatter": "ms-vscode.powershell"
}
}
27 changes: 27 additions & 0 deletions client/src/connection/itc/GetInteropDirectory.psm1
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
function GetInteropDirectory {
# try to load from user specified path first
if ("$($global:interopLibraryFolderPath)") {
if (Test-Path -Path "$($global:interopLibraryFolderPath)\\SASInterop.dll") {
return "$($global:interopLibraryFolderPath)"
}
}

# try to load path from registry
try {
$pathFromRegistry = (Get-ItemProperty -ErrorAction Stop -Path "HKLM:\\SOFTWARE\\WOW6432Node\\SAS Institute Inc.\\Common Data\\Shared Files\\Integration Technologies").Path
if (Test-Path -Path "$pathFromRegistry\\SASInterop.dll") {
return $pathFromRegistry
}
} catch {
}

# try to load path from integration technologies
$itcPath = "C:\\Program Files\\SASHome\\x86\\Integration Technologies"
if (Test-Path -Path "$itcPath\\SASInterop.dll") {
return $itcPath
}

return ""
}

Export-ModuleMember -Function GetInteropDirectory
8 changes: 0 additions & 8 deletions client/src/connection/itc/const.ts

This file was deleted.

15 changes: 15 additions & 0 deletions client/src/connection/itc/env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"LineCodes": {
"LogLineType": "--vscode-sas-extension-log-line-type--",
"ResultsFetchedCode": "--vscode-sas-extension-results-fetched--",
"RunCancelledCode": "--vscode-sas-extension-run-cancelled--",
"RunEndCode": "--vscode-sas-extension-submit-end--",
"SessionCreatedCode": "--vscode-sas-extension-session-created--"
},
"Tags": {
"ErrorEndTag": "</ITCError>",
"ErrorStartTag": "<ITCError>",
"WorkDirEndTag": "</WorkDirectory>",
"WorkDirStartTag": "<WorkDirectory>"
}
}
19 changes: 9 additions & 10 deletions client/src/connection/itc/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,9 @@ import { updateStatusBarItem } from "../../components/StatusBarItem";
import { Session } from "../session";
import { extractOutputHtmlFileName } from "../util";
import { LineParser } from "./LineParser";
import {
ERROR_END_TAG,
ERROR_START_TAG,
WORK_DIR_END_TAG,
WORK_DIR_START_TAG,
} from "./const";
import { LineCodes, Tags } from "./env.json";
import { getScript } from "./script";
import { Config, ITCProtocol, LineCodes } from "./types";
import { Config, ITCProtocol } from "./types";
import {
decodeEntities,
escapePowershellString,
Expand Down Expand Up @@ -75,10 +70,14 @@ export class ITCSession extends Session {
this._password = "";
this._secretStorage = getSecretStorage(SECRET_STORAGE_NAMESPACE);
this._pollingForLogResults = false;
this._errorParser = new LineParser(ERROR_START_TAG, ERROR_END_TAG, true);
this._errorParser = new LineParser(
Tags.ErrorStartTag,
Tags.ErrorEndTag,
true,
);
this._workDirectoryParser = new LineParser(
WORK_DIR_START_TAG,
WORK_DIR_END_TAG,
Tags.WorkDirStartTag,
Tags.WorkDirEndTag,
false,
);
}
Expand Down
Loading
Loading