Skip to content

Commit

Permalink
2.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
arabold committed Jun 22, 2022
1 parent 6cbe2e7 commit 587de2c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dist/git-rev.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ var GitRev = /** @class */ (function () {
GitRev.prototype.exactTag = function () {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
// Suppress errors
// Suppress errors as this will fail if no tag exists yet
return [2 /*return*/, this._command("git describe --exact-match --tags HEAD").catch(function () { return undefined; })];
});
});
Expand Down
16 changes: 12 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
Object.defineProperty(exports, "__esModule", { value: true });
exports.SentryPlugin = void 0;
var path = require("path");
var promise_pool_1 = require("@supercharge/promise-pool");
var AdmZip = require("adm-zip");
var SemVer = require("semver");
var request = require("superagent");
Expand Down Expand Up @@ -547,7 +548,7 @@ var SentryPlugin = /** @class */ (function () {
// Nothing to do
return [2 /*return*/];
}
this.serverless.cli.log("Uploading sourcemaps to sentry", "sentry");
this.serverless.cli.log("Uploading source maps to Sentry", "sentry");
artifacts = new Set(this.serverless.service
.getAllFunctions()
.map(function (name) { var _a; return (_a = _this.serverless.service.getFunction(name).package) === null || _a === void 0 ? void 0 : _a.artifact; })
Expand All @@ -561,10 +562,17 @@ var SentryPlugin = /** @class */ (function () {
}
});
});
// Upload artifacts one after the other
return [4 /*yield*/, results.reduce(function (previousPromise, nextArtifact) { return previousPromise.then(function () { return nextArtifact(); }); }, Promise.resolve())];
// Upload artifacts
return [4 /*yield*/, promise_pool_1.PromisePool.withConcurrency(5)
.for(results)
.process(function (nextArtifact) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, nextArtifact()];
case 1: return [2 /*return*/, _a.sent()];
}
}); }); })];
case 1:
// Upload artifacts one after the other
// Upload artifacts
_a.sent();
return [2 /*return*/];
}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "serverless-sentry",
"version": "2.5.1",
"version": "2.5.2",
"description": "Serverless Sentry Plugin - Automatically send errors and exceptions to Sentry (https://sentry.io)",
"license": "MIT",
"repository": {
Expand Down

0 comments on commit 587de2c

Please sign in to comment.