Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ioffice/tc-builder

Package Overview
Dependencies
Maintainers
2
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ioffice/tc-builder - npm Package Compare versions

Comparing version 2.1.3-beta.1807161213 to 2.1.3-beta.1807161248

2

package.json
{
"name": "@ioffice/tc-builder",
"version": "2.1.3-beta.1807161213",
"version": "2.1.3-beta.1807161248",
"description": "iOFFICE TeamCity Builder",

@@ -5,0 +5,0 @@ "main": "index.js",

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var Util_1 = require("../Util");
/**
* Trying to keep this file free of dependencies. Using
*
* https://hackernoon.com/functional-javascript-resolving-promises-sequentially-7aac18c4431e
*/
function promiseSerial(funcs) {
return funcs.reduce(function (promise, func) {
return promise.then(function (result) { return func().then(Array.prototype.concat.bind(result)); });
}, Promise.resolve([]));
}
/**
* Executes `yarn add` on a set of dependencies specified in the package object provided.
*/
function install(pkg, depType, options) {
var _this = this;
var _a = options || {}, _b = _a.exact, exact = _b === void 0 ? false : _b, _c = _a.regex, regex = _c === void 0 ? '' : _c, _d = _a.latest, latest = _d === void 0 ? false : _d;

@@ -14,22 +22,21 @@ return new Promise(function (resolve, reject) {

var deps = pkg[depType];
var promises = Object.keys(deps).map(function (name) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var version, eParam, dParam, cmd;
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
case 0:
if (regex && !name.match(new RegExp(regex, 'i')))
return [2 /*return*/];
version = latest ? 'latest' : deps[name];
eParam = exact ? ' -E' : '';
dParam = depType === 'devDependencies' ? ' -D' : '';
cmd = "yarn add" + eParam + dParam + " " + name + "@" + version;
process.stdout.write("$ " + cmd + "\n");
return [4 /*yield*/, Util_1.util.execCmd(cmd, true).catch(function () {
exitNumber += 1;
})];
case 1: return [2 /*return*/, _a.sent()];
}
});
}); });
Promise.all(promises).then(function () {
var fns = Object.keys(deps)
.filter(function (name) {
if (regex && !name.match(new RegExp(regex, 'i')))
return false;
return true;
})
.map(function (name) {
return function () {
var version = latest ? 'latest' : deps[name];
var eParam = exact ? ' -E' : '';
var dParam = depType === 'devDependencies' ? ' -D' : '';
var cmd = "yarn add" + eParam + dParam + " " + name + "@" + version;
process.stdout.write("$ " + cmd + "\n");
return Util_1.util.execCmd(cmd, true).catch(function () {
exitNumber += 1;
});
};
});
promiseSerial(fns).then(function () {
if (exitNumber === 0) {

@@ -36,0 +43,0 @@ resolve(0);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc