UNPKG

azdev-automation

Version:

Azure DevOps automation framework enables access control automation of projects, pipelines and repositories configuration in Azure DevOps Services

16 lines (15 loc) 553 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CommonHelper = void 0; class CommonHelper { constructor(logger) { this.debugLogger = logger.extend(this.constructor.name); } async wait(min, max) { const debug = this.debugLogger.extend(this.wait.name); const delay = Math.floor(Math.random() * (max - min + 1) + min); debug(`Waiting <${delay}> milliseconds`); return new Promise((resolve) => setTimeout(resolve, delay)); } } exports.CommonHelper = CommonHelper;