iso20022
Version:
Generate & Validate ISO 20022 XML Message
33 lines (32 loc) • 1.15 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPlatform = exports.getAppPath = void 0;
const path_1 = __importDefault(require("path"));
const os_1 = __importDefault(require("os"));
const platform = os_1.default.platform();
const getAppPath = () => {
let mxCliAppPath;
// Determine the correct executable path based on the platform
switch (platform) {
case 'win32':
mxCliAppPath = path_1.default.join(__dirname, 'tools', 'win-x64', 'MXCli.exe');
break;
case 'linux':
mxCliAppPath = path_1.default.join(__dirname, 'tools', 'linux-x64', 'MXCli');
break;
case 'darwin': // macOS
mxCliAppPath = path_1.default.join(__dirname, 'tools', 'osx-x64', 'MXCli');
break;
default:
mxCliAppPath = '';
}
return mxCliAppPath;
};
exports.getAppPath = getAppPath;
const getPlatform = () => {
return platform;
};
exports.getPlatform = getPlatform;