@jameslnewell/buildkite-pipelines
Version:
Generate Buildkite pipelines from code.
26 lines • 1.32 kB
JavaScript
;
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
var _NotificationHelper_notifications;
Object.defineProperty(exports, "__esModule", { value: true });
exports.NotificationHelper = void 0;
class NotificationHelper {
constructor() {
_NotificationHelper_notifications.set(this, []);
}
/**
* @see https://buildkite.com/docs/pipelines/notifications
*/
addNotification(notification) {
__classPrivateFieldGet(this, _NotificationHelper_notifications, "f").push(notification);
}
build() {
return __classPrivateFieldGet(this, _NotificationHelper_notifications, "f").length > 0 ? { notify: __classPrivateFieldGet(this, _NotificationHelper_notifications, "f") } : {};
}
}
exports.NotificationHelper = NotificationHelper;
_NotificationHelper_notifications = new WeakMap();
//# sourceMappingURL=notifification.js.map