UNPKG

nwixtoolset

Version:

Node module wrapper around the WIX Toolset executables.

37 lines (36 loc) 1.76 kB
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); const run_1 = require("./run"); const util_1 = require("./util"); /** * WIX Toolset Scanner. * * @param src The file(s) to scan (path|*.wixproj|*.wixpdb|...). * @param [options] Options for the scanner. */ function shine(src, options = {}) { return __awaiter(this, void 0, void 0, function* () { const args = ["-nologo"]; yield util_1.addPathArgument(args, "-dgml", options.dgml); yield util_1.addPathArgument(args, "-dgmlTemplate", options.dgmlTemplate); yield util_1.addPathArgument(args, "-excludeSymbol", options.excludeSymbol); yield util_1.addPathArgument(args, "-includeSymbol", options.includeSymbol); if (!util_1.undef(options.show)) { Array.isArray(options.show) ? args.push("-show", options.show.join(";")) : args.push("-show", options.show); } yield util_1.addPathFile(args, src); return run_1.raw.shine(args, options); }); } exports.shine = shine;