upscayl-node
Version:
Upscale node package based on upscayl
44 lines • 1.33 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Specs = void 0;
var os_1 = require("os");
var not_platform_error_1 = require("./errors/not-platform-error");
var not_architecture_error_1 = require("./errors/not-architecture-error");
var Specs = (function () {
function Specs() {
this.plat = (0, os_1.platform)();
this.ar = (0, os_1.arch)();
}
Specs.prototype.getPlatform = function () {
switch (this.plat) {
case 'aix':
case 'freebsd':
case 'linux':
case 'openbsd':
case 'android':
return 'linux';
case 'darwin':
case 'sunos':
return 'mac';
case 'win32':
return 'win';
}
throw new not_platform_error_1.SpecsNotPlatformError();
};
Specs.prototype.getArch = function () {
switch (this.ar) {
case 'x64':
return 'x64';
case 'x32':
return 'x86';
case 'arm':
return 'arm';
case 'arm64':
return 'arm64';
}
throw new not_architecture_error_1.SpecsNotArchitectureError();
};
return Specs;
}());
exports.Specs = Specs;
//# sourceMappingURL=specs.js.map