From 2dfa5ce3d63eda865eb7d1c49cfc9c391436545e Mon Sep 17 00:00:00 2001 From: Shannon Lewis Date: Sat, 10 Dec 2022 11:20:28 +1000 Subject: [PATCH] fix: Fixed a bug with nested directory handling --- dist/index.js | 8698 +++++++++++++++++++++++---------------------- package-lock.json | 11 +- package.json | 2 +- 3 files changed, 4358 insertions(+), 4353 deletions(-) diff --git a/dist/index.js b/dist/index.js index e548a90..5423f3e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1766,17 +1766,17 @@ exports.checkBypass = checkBypass; /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AdapterError = void 0; -var AdapterError = /** @class */ (function () { - function AdapterError(code, message) { - this.code = code; - this.message = message; - } - return AdapterError; -}()); -exports.AdapterError = AdapterError; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdapterError = void 0; +var AdapterError = /** @class */ (function () { + function AdapterError(code, message) { + this.code = code; + this.message = message; + } + return AdapterError; +}()); +exports.AdapterError = AdapterError; /***/ }), @@ -1785,117 +1785,117 @@ exports.AdapterError = AdapterError; /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "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()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AxiosAdapter = void 0; -var axios_1 = __importDefault(__nccwpck_require__(6545)); -var adapter_1 = __nccwpck_require__(937); -var AxiosAdapter = /** @class */ (function () { - function AxiosAdapter() { - } - AxiosAdapter.prototype.execute = function (options) { - var _a, _b; - return __awaiter(this, void 0, void 0, function () { - function formatError(response) { - if (!response.data) { - return undefined; - } - var message = response.data.ErrorMessage; - if (response.data.Errors) { - var errors = response.data.Errors; - for (var i = 0; i < errors.length; i++) { - message += "\n".concat(errors[i]); - } - } - return message; - } - var config, userAgent, response, error_1; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - _c.trys.push([0, 2, , 3]); - config = { - httpsAgent: options.configuration.httpsAgent, - url: options.url, - method: options.method, - data: options.requestBody, - headers: { - "X-Octopus-ApiKey": (_a = options.configuration.apiKey) !== null && _a !== void 0 ? _a : "", - }, - responseType: "json", - }; - if (typeof XMLHttpRequest === "undefined") { - if (config.headers) { - userAgent = "ts-octopusdeploy"; - if (options.configuration.userAgentApp) { - userAgent = "".concat(userAgent, " ").concat(options.configuration.userAgentApp); - } - config.headers["User-Agent"] = userAgent; - } - } - return [4 /*yield*/, axios_1.default.request(config)]; - case 1: - response = _c.sent(); - return [2 /*return*/, { - data: response.data, - statusCode: response.status, - }]; - case 2: - error_1 = _c.sent(); - if (axios_1.default.isAxiosError(error_1) && error_1.response) { - throw new adapter_1.AdapterError(error_1.response.status, (_b = formatError(error_1.response)) !== null && _b !== void 0 ? _b : error_1.message); - } - else { - throw error_1; - } - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); - }; - return AxiosAdapter; -}()); -exports.AxiosAdapter = AxiosAdapter; + +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()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AxiosAdapter = void 0; +var axios_1 = __importDefault(__nccwpck_require__(6545)); +var adapter_1 = __nccwpck_require__(937); +var AxiosAdapter = /** @class */ (function () { + function AxiosAdapter() { + } + AxiosAdapter.prototype.execute = function (options) { + var _a, _b; + return __awaiter(this, void 0, void 0, function () { + function formatError(response) { + if (!response.data) { + return undefined; + } + var message = response.data.ErrorMessage; + if (response.data.Errors) { + var errors = response.data.Errors; + for (var i = 0; i < errors.length; i++) { + message += "\n".concat(errors[i]); + } + } + return message; + } + var config, userAgent, response, error_1; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + _c.trys.push([0, 2, , 3]); + config = { + httpsAgent: options.configuration.httpsAgent, + url: options.url, + method: options.method, + data: options.requestBody, + headers: { + "X-Octopus-ApiKey": (_a = options.configuration.apiKey) !== null && _a !== void 0 ? _a : "", + }, + responseType: "json", + }; + if (typeof XMLHttpRequest === "undefined") { + if (config.headers) { + userAgent = "ts-octopusdeploy"; + if (options.configuration.userAgentApp) { + userAgent = "".concat(userAgent, " ").concat(options.configuration.userAgentApp); + } + config.headers["User-Agent"] = userAgent; + } + } + return [4 /*yield*/, axios_1.default.request(config)]; + case 1: + response = _c.sent(); + return [2 /*return*/, { + data: response.data, + statusCode: response.status, + }]; + case 2: + error_1 = _c.sent(); + if (axios_1.default.isAxiosError(error_1) && error_1.response) { + throw new adapter_1.AdapterError(error_1.response.status, (_b = formatError(error_1.response)) !== null && _b !== void 0 ? _b : error_1.message); + } + else { + throw error_1; + } + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); + }; + return AxiosAdapter; +}()); +exports.AxiosAdapter = AxiosAdapter; /***/ }), @@ -1904,130 +1904,130 @@ exports.AxiosAdapter = AxiosAdapter; /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "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()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var octopusError_1 = __nccwpck_require__(408); -var adapter_1 = __nccwpck_require__(937); -var axiosAdapter_1 = __nccwpck_require__(9018); -var ApiClient = /** @class */ (function () { - function ApiClient(options) { - var _this = this; - this.handleSuccess = function (response) { - if (_this.options.onResponseCallback) { - var details = { - // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/consistent-type-assertions - method: _this.options.method, - url: _this.options.url, - statusCode: response.statusCode, - }; - _this.options.onResponseCallback(details); - } - var responseText = ""; - if (_this.options.raw) { - // eslint-disable-next-line @typescript-eslint/consistent-type-assertions - responseText = response.data; - } - else { - responseText = JSON.stringify(response.data); - if (responseText && responseText.length > 0) { - responseText = JSON.parse(responseText); - } - } - _this.options.success(responseText); - }; - this.handleError = function (requestError) { - var err = generateOctopusError(requestError); - if (_this.options.onErrorResponseCallback) { - var details = { - // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/consistent-type-assertions - method: _this.options.method, - url: _this.options.url, - statusCode: err.StatusCode, - errorMessage: err.ErrorMessage, - errors: err.Errors, - }; - _this.options.onErrorResponseCallback(details); - } - _this.options.error(err); - }; - this.options = options; - this.adapter = new axiosAdapter_1.AxiosAdapter(); - } - ApiClient.prototype.execute = function () { - return __awaiter(this, void 0, void 0, function () { - var response, error_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - return [4 /*yield*/, this.adapter.execute(this.options)]; - case 1: - response = _a.sent(); - this.handleSuccess(response); - return [3 /*break*/, 3]; - case 2: - error_1 = _a.sent(); - if (error_1 instanceof adapter_1.AdapterError) { - this.handleError(error_1); - } - else if (error_1 instanceof Error) { - this.options.error(error_1); - } - else { - this.options.error(Error("An unknown error occurred: ".concat(error_1))); - } - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); - }; - return ApiClient; -}()); -exports["default"] = ApiClient; -var generateOctopusError = function (requestError) { - if (requestError.code) { - var code = requestError.code; - return new octopusError_1.OctopusError(code, requestError.message); - } - return new octopusError_1.OctopusError(0, requestError.message); -}; + +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()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var octopusError_1 = __nccwpck_require__(408); +var adapter_1 = __nccwpck_require__(937); +var axiosAdapter_1 = __nccwpck_require__(9018); +var ApiClient = /** @class */ (function () { + function ApiClient(options) { + var _this = this; + this.handleSuccess = function (response) { + if (_this.options.onResponseCallback) { + var details = { + // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/consistent-type-assertions + method: _this.options.method, + url: _this.options.url, + statusCode: response.statusCode, + }; + _this.options.onResponseCallback(details); + } + var responseText = ""; + if (_this.options.raw) { + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions + responseText = response.data; + } + else { + responseText = JSON.stringify(response.data); + if (responseText && responseText.length > 0) { + responseText = JSON.parse(responseText); + } + } + _this.options.success(responseText); + }; + this.handleError = function (requestError) { + var err = generateOctopusError(requestError); + if (_this.options.onErrorResponseCallback) { + var details = { + // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/consistent-type-assertions + method: _this.options.method, + url: _this.options.url, + statusCode: err.StatusCode, + errorMessage: err.ErrorMessage, + errors: err.Errors, + }; + _this.options.onErrorResponseCallback(details); + } + _this.options.error(err); + }; + this.options = options; + this.adapter = new axiosAdapter_1.AxiosAdapter(); + } + ApiClient.prototype.execute = function () { + return __awaiter(this, void 0, void 0, function () { + var response, error_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + return [4 /*yield*/, this.adapter.execute(this.options)]; + case 1: + response = _a.sent(); + this.handleSuccess(response); + return [3 /*break*/, 3]; + case 2: + error_1 = _a.sent(); + if (error_1 instanceof adapter_1.AdapterError) { + this.handleError(error_1); + } + else if (error_1 instanceof Error) { + this.options.error(error_1); + } + else { + this.options.error(Error("An unknown error occurred: ".concat(error_1))); + } + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); + }; + return ApiClient; +}()); +exports["default"] = ApiClient; +var generateOctopusError = function (requestError) { + if (requestError.code) { + var code = requestError.code; + return new octopusError_1.OctopusError(code, requestError.message); + } + return new octopusError_1.OctopusError(0, requestError.message); +}; /***/ }), @@ -2036,10 +2036,10 @@ var generateOctopusError = function (requestError) { /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.apiLocation = void 0; -exports.apiLocation = "~/api"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.apiLocation = void 0; +exports.apiLocation = "~/api"; /***/ }), @@ -2048,100 +2048,100 @@ exports.apiLocation = "~/api"; /***/ ((__unused_webpack_module, exports) => { "use strict"; - -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/* eslint-disable @typescript-eslint/init-declarations */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -var MAX_MEMORY = (Math.pow(1024, 2) * 1000) / 2; //1GB /2 (1 character in js is 2 bytes) -var Caching = /** @class */ (function () { - function Caching(options) { - this.cache = {}; - options = options || { - maxMemory: MAX_MEMORY, - }; - this.maxMemory = options.maxMemory; - this.dataVersionHeader = "X-Octopus-Data-Version"; - this.authorizationHashHeader = "X-Octopus-Authorization-Hash"; - } - Caching.prototype.clearAll = function () { - this.cache = {}; - }; - Caching.prototype.setHeaderAndGetValue = function (request, options) { - if (this.cache[options.url]) { - request.setRequestHeader(this.dataVersionHeader, this.cache[options.url].dataVersion); - request.setRequestHeader(this.authorizationHashHeader, this.cache[options.url].authorizationHash); - this.cache[options.url].lastAccessed = new Date(); - return this.cache[options.url].value; - } - }; - Caching.prototype.updateCache = function (request, options) { - try { - var dataVersion = request.getResponseHeader(this.dataVersionHeader); - var authorizationHash = request.getResponseHeader(this.authorizationHashHeader); - if (!!dataVersion && !!authorizationHash) { - var item = { - dataVersion: dataVersion, - authorizationHash: authorizationHash, - lastAccessed: new Date(), - value: request.responseText, - }; - var itemSize = this.itemSizeInMemory(options.url, item); - if (itemSize < this.maxMemory) { - this.cache[options.url] = item; - } - this.memoryPressureCleanup(); - } - else { - delete this.cache[options.url]; - } - } - catch (e) { - delete this.cache[options.url]; - } - }; - Caching.prototype.canUseCachedValue = function (request) { - return request.status === 304 && (request.responseText === "" || !request.responseText); - }; - Caching.prototype.memoryPressureCleanup = function () { - var currentMemory = this.roughSizeOfReleasableMemory(); - while (currentMemory >= this.maxMemory) { - this.removeOldest(); - var newMemoryLevel = this.roughSizeOfReleasableMemory(); - if (newMemoryLevel === currentMemory) { - // Just make sure we don't get stuck. - return; - } - currentMemory = newMemoryLevel; - } - }; - Caching.prototype.itemSizeInMemory = function (url, item) { - return url.length + item.value.length; - }; - Caching.prototype.removeOldest = function () { - var _this = this; - var oldestUrl; - var oldestResponded = -1; - var now = new Date(); - Object.keys(this.cache).forEach(function (url) { - var age = now.valueOf() - _this.cache[url].lastAccessed.valueOf(); - if (age > oldestResponded) { - oldestResponded = age; - oldestUrl = url; - } - }); - delete this.cache[oldestUrl]; - }; - Caching.prototype.roughSizeOfReleasableMemory = function () { - var _this = this; - return Object.keys(this.cache).reduce(function (total, url) { - var item = _this.cache[url]; - return total + _this.itemSizeInMemory(url, item); - }, 0); - }; - return Caching; -}()); -exports["default"] = Caching; + +/* eslint-disable @typescript-eslint/no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/init-declarations */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +var MAX_MEMORY = (Math.pow(1024, 2) * 1000) / 2; //1GB /2 (1 character in js is 2 bytes) +var Caching = /** @class */ (function () { + function Caching(options) { + this.cache = {}; + options = options || { + maxMemory: MAX_MEMORY, + }; + this.maxMemory = options.maxMemory; + this.dataVersionHeader = "X-Octopus-Data-Version"; + this.authorizationHashHeader = "X-Octopus-Authorization-Hash"; + } + Caching.prototype.clearAll = function () { + this.cache = {}; + }; + Caching.prototype.setHeaderAndGetValue = function (request, options) { + if (this.cache[options.url]) { + request.setRequestHeader(this.dataVersionHeader, this.cache[options.url].dataVersion); + request.setRequestHeader(this.authorizationHashHeader, this.cache[options.url].authorizationHash); + this.cache[options.url].lastAccessed = new Date(); + return this.cache[options.url].value; + } + }; + Caching.prototype.updateCache = function (request, options) { + try { + var dataVersion = request.getResponseHeader(this.dataVersionHeader); + var authorizationHash = request.getResponseHeader(this.authorizationHashHeader); + if (!!dataVersion && !!authorizationHash) { + var item = { + dataVersion: dataVersion, + authorizationHash: authorizationHash, + lastAccessed: new Date(), + value: request.responseText, + }; + var itemSize = this.itemSizeInMemory(options.url, item); + if (itemSize < this.maxMemory) { + this.cache[options.url] = item; + } + this.memoryPressureCleanup(); + } + else { + delete this.cache[options.url]; + } + } + catch (e) { + delete this.cache[options.url]; + } + }; + Caching.prototype.canUseCachedValue = function (request) { + return request.status === 304 && (request.responseText === "" || !request.responseText); + }; + Caching.prototype.memoryPressureCleanup = function () { + var currentMemory = this.roughSizeOfReleasableMemory(); + while (currentMemory >= this.maxMemory) { + this.removeOldest(); + var newMemoryLevel = this.roughSizeOfReleasableMemory(); + if (newMemoryLevel === currentMemory) { + // Just make sure we don't get stuck. + return; + } + currentMemory = newMemoryLevel; + } + }; + Caching.prototype.itemSizeInMemory = function (url, item) { + return url.length + item.value.length; + }; + Caching.prototype.removeOldest = function () { + var _this = this; + var oldestUrl; + var oldestResponded = -1; + var now = new Date(); + Object.keys(this.cache).forEach(function (url) { + var age = now.valueOf() - _this.cache[url].lastAccessed.valueOf(); + if (age > oldestResponded) { + oldestResponded = age; + oldestUrl = url; + } + }); + delete this.cache[oldestUrl]; + }; + Caching.prototype.roughSizeOfReleasableMemory = function () { + var _this = this; + return Object.keys(this.cache).reduce(function (total, url) { + var item = _this.cache[url]; + return total + _this.itemSizeInMemory(url, item); + }, 0); + }; + return Caching; +}()); +exports["default"] = Caching; /***/ }), @@ -2150,343 +2150,343 @@ exports["default"] = Caching; /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -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()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Client = void 0; -var apiClient_1 = __importDefault(__nccwpck_require__(1542)); -var resolver_1 = __nccwpck_require__(8043); -var subscriptionRecord_1 = __nccwpck_require__(1547); -var spaceScopedOperation_1 = __nccwpck_require__(3667); -var spaceResolver_1 = __nccwpck_require__(2054); -var spaceScopedArgs_1 = __nccwpck_require__(5626); -var spaceScopedRequest_1 = __nccwpck_require__(3295); -var apiLocation_1 = __nccwpck_require__(7083); -// The Octopus Client implements the low-level semantics of the Octopus Deploy REST API -var Client = /** @class */ (function () { - function Client(resolver, configuration) { - var _this = this; - this.resolver = resolver; - this.configuration = configuration; - this.requestSubscriptions = new subscriptionRecord_1.SubscriptionRecord(); - this.responseSubscriptions = new subscriptionRecord_1.SubscriptionRecord(); - this.errorSubscriptions = new subscriptionRecord_1.SubscriptionRecord(); - this.onRequestCallback = undefined; - this.onResponseCallback = undefined; - this.onErrorResponseCallback = undefined; - this.debug = function (message) { - _this.logger.debug && _this.logger.debug(message); - }; - this.info = function (message) { - _this.logger.info && _this.logger.info(message); - }; - this.warn = function (message) { - _this.logger.warn && _this.logger.warn(message); - }; - this.error = function (message, error) { - if (error === void 0) { error = undefined; } - _this.logger.error && _this.logger.error(message, error); - }; - this.subscribeToRequests = function (registrationName, callback) { - return _this.requestSubscriptions.subscribe(registrationName, callback); - }; - this.subscribeToResponses = function (registrationName, callback) { - return _this.responseSubscriptions.subscribe(registrationName, callback); - }; - this.subscribeToErrors = function (registrationName, callback) { - return _this.errorSubscriptions.subscribe(registrationName, callback); - }; - this.setOnRequestCallback = function (callback) { - _this.onRequestCallback = callback; - }; - this.setOnResponseCallback = function (callback) { - _this.onResponseCallback = callback; - }; - this.setOnErrorResponseCallback = function (callback) { - _this.onErrorResponseCallback = callback; - }; - this.resolve = function (path, uriTemplateParameters) { return _this.resolver.resolve(path, uriTemplateParameters); }; - this.configuration = configuration; - this.logger = configuration.logging || { - debug: function (message) { return null; }, - info: function (message) { return null; }, - warn: function (message) { return null; }, - error: function (message, err) { return null; }, - }; - this.resolver = resolver; - } - Client.create = function (configuration) { - return __awaiter(this, void 0, void 0, function () { - var resolver, client; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!configuration.instanceURL) { - throw new Error("The host is not specified"); - } - resolver = new resolver_1.Resolver(configuration.instanceURL); - client = new Client(resolver, configuration); - return [4 /*yield*/, client.getServerInformation()]; - case 1: - _a.sent(); - return [2 /*return*/, client]; - } - }); - }); - }; - Client.prototype.get = function (path, args) { - if (path === undefined) - throw new Error("path parameter was not"); - var url = this.resolveUrl(path, args); - // eslint-disable-next-line @typescript-eslint/consistent-type-assertions - return this.dispatchRequest("GET", url); - }; - Client.prototype.getRaw = function (path, args) { - var _this = this; - var url = this.resolve(path, args); - return new Promise(function (resolve, reject) { - new apiClient_1.default({ - configuration: _this.configuration, - url: url, - method: "GET", - error: function (e) { return reject(e); }, - raw: true, - success: function (data) { return resolve(data); }, - onRequestCallback: function (r) { return _this.onRequest(r); }, - onResponseCallback: function (r) { return _this.onResponse(r); }, - onErrorResponseCallback: function (r) { return _this.onErrorResponse(r); }, - }).execute(); - }); - }; - Client.prototype.onRequest = function (clientRequestDetails) { - var details = { - url: clientRequestDetails.url, - method: clientRequestDetails.method, - }; - if (this.onRequestCallback) { - this.onRequestCallback(details); - } - this.requestSubscriptions.notifyAll(details); - }; - Client.prototype.onResponse = function (clientResponseDetails) { - var details = { - url: clientResponseDetails.url, - method: clientResponseDetails.method, - statusCode: clientResponseDetails.statusCode, - }; - if (this.onResponseCallback) { - this.onResponseCallback(details); - } - this.responseSubscriptions.notifyAll(details); - }; - Client.prototype.onErrorResponse = function (clientErrorResponseDetails) { - var details = { - url: clientErrorResponseDetails.url, - method: clientErrorResponseDetails.method, - statusCode: clientErrorResponseDetails.statusCode, - errorMessage: clientErrorResponseDetails.errorMessage, - errors: clientErrorResponseDetails.errors, - }; - if (this.onErrorResponseCallback) { - this.onErrorResponseCallback(details); - } - this.errorSubscriptions.notifyAll(details); - }; - Client.prototype.doCreate = function (path, command, args) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.doCommand("POST", path, command, args)]; - }); - }); - }; - Client.prototype.doUpdate = function (path, command, args) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.doCommand("PUT", path, command, args)]; - }); - }); - }; - Client.prototype.doCommand = function (verb, path, command, args) { - return __awaiter(this, void 0, void 0, function () { - var spaceId, spaceId, url; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!(0, spaceScopedOperation_1.isSpaceScopedOperation)(command)) return [3 /*break*/, 2]; - return [4 /*yield*/, (0, spaceResolver_1.resolveSpaceId)(this, command.spaceName)]; - case 1: - spaceId = _a.sent(); - args = __assign({ spaceId: spaceId }, args); - command = __assign({ spaceId: spaceId }, command); - _a.label = 2; - case 2: - if (!(args && (0, spaceScopedArgs_1.isSpaceScopedArgs)(args))) return [3 /*break*/, 4]; - return [4 /*yield*/, (0, spaceResolver_1.resolveSpaceId)(this, args.spaceName)]; - case 3: - spaceId = _a.sent(); - args = __assign({ spaceId: spaceId }, args); - _a.label = 4; - case 4: - url = this.resolveUrl(path, args); - // eslint-disable-next-line @typescript-eslint/consistent-type-assertions - return [2 /*return*/, this.dispatchRequest(verb, url, command)]; - } - }); - }); - }; - Client.prototype.request = function (path, request) { - return __awaiter(this, void 0, void 0, function () { - var spaceId, url; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!(0, spaceScopedRequest_1.isSpaceScopedRequest)(request)) return [3 /*break*/, 2]; - return [4 /*yield*/, (0, spaceResolver_1.resolveSpaceId)(this, request.spaceName)]; - case 1: - spaceId = _a.sent(); - request = __assign({ spaceId: spaceId }, request); - _a.label = 2; - case 2: - url = this.resolveUrl(path, request); - // eslint-disable-next-line @typescript-eslint/consistent-type-assertions - return [2 /*return*/, this.dispatchRequest("GET", url, null)]; - } - }); - }); - }; - Client.prototype.post = function (path, resource, args) { - var url = this.resolveUrl(path, args); - // eslint-disable-next-line @typescript-eslint/consistent-type-assertions - return this.dispatchRequest("POST", url, resource); - }; - Client.prototype.del = function (path, args) { - return __awaiter(this, void 0, void 0, function () { - var spaceId, url; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!(args && (0, spaceScopedArgs_1.isSpaceScopedArgs)(args))) return [3 /*break*/, 2]; - return [4 /*yield*/, (0, spaceResolver_1.resolveSpaceId)(this, args.spaceName)]; - case 1: - spaceId = _a.sent(); - args = __assign({ spaceId: spaceId }, args); - _a.label = 2; - case 2: - url = this.resolve(path, args); - return [2 /*return*/, this.dispatchRequest("DELETE", url, undefined)]; - } - }); - }); - }; - Client.prototype.getServerInformation = function () { - return __awaiter(this, void 0, void 0, function () { - var _a; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - if (!!this.serverInformation) return [3 /*break*/, 2]; - _a = this; - return [4 /*yield*/, this.tryGetServerInformation()]; - case 1: - _a.serverInformation = _b.sent(); - if (!this.serverInformation) { - throw new Error("The Octopus server information could not be retrieved. Please check the configured URL."); - } - _b.label = 2; - case 2: return [2 /*return*/, this.serverInformation]; - } - }); - }); - }; - Client.prototype.tryGetServerInformation = function () { - return __awaiter(this, void 0, void 0, function () { - var rootDocument; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.get(apiLocation_1.apiLocation)]; - case 1: - rootDocument = _a.sent(); - return [2 /*return*/, rootDocument - ? { - version: rootDocument.Version, - installationId: rootDocument.InstallationId, - } - : null]; - } - }); - }); - }; - Client.prototype.dispatchRequest = function (method, url, requestBody) { - var _this = this; - return new Promise(function (resolve, reject) { - new apiClient_1.default({ - configuration: _this.configuration, - error: function (e) { return reject(e); }, - method: method, - url: url, - requestBody: requestBody, - success: function (data) { return resolve(data); }, - onRequestCallback: function (r) { return _this.onRequest(r); }, - onResponseCallback: function (r) { return _this.onResponse(r); }, - onErrorResponseCallback: function (r) { return _this.onErrorResponse(r); }, - }).execute(); - }); - }; - Client.prototype.resolveUrl = function (path, args) { - return this.resolve(path, args); - }; - return Client; -}()); -exports.Client = Client; + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +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()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Client = void 0; +var apiClient_1 = __importDefault(__nccwpck_require__(1542)); +var resolver_1 = __nccwpck_require__(8043); +var subscriptionRecord_1 = __nccwpck_require__(1547); +var spaceScopedOperation_1 = __nccwpck_require__(3667); +var spaceResolver_1 = __nccwpck_require__(2054); +var spaceScopedArgs_1 = __nccwpck_require__(5626); +var spaceScopedRequest_1 = __nccwpck_require__(3295); +var apiLocation_1 = __nccwpck_require__(7083); +// The Octopus Client implements the low-level semantics of the Octopus Deploy REST API +var Client = /** @class */ (function () { + function Client(resolver, configuration) { + var _this = this; + this.resolver = resolver; + this.configuration = configuration; + this.requestSubscriptions = new subscriptionRecord_1.SubscriptionRecord(); + this.responseSubscriptions = new subscriptionRecord_1.SubscriptionRecord(); + this.errorSubscriptions = new subscriptionRecord_1.SubscriptionRecord(); + this.onRequestCallback = undefined; + this.onResponseCallback = undefined; + this.onErrorResponseCallback = undefined; + this.debug = function (message) { + _this.logger.debug && _this.logger.debug(message); + }; + this.info = function (message) { + _this.logger.info && _this.logger.info(message); + }; + this.warn = function (message) { + _this.logger.warn && _this.logger.warn(message); + }; + this.error = function (message, error) { + if (error === void 0) { error = undefined; } + _this.logger.error && _this.logger.error(message, error); + }; + this.subscribeToRequests = function (registrationName, callback) { + return _this.requestSubscriptions.subscribe(registrationName, callback); + }; + this.subscribeToResponses = function (registrationName, callback) { + return _this.responseSubscriptions.subscribe(registrationName, callback); + }; + this.subscribeToErrors = function (registrationName, callback) { + return _this.errorSubscriptions.subscribe(registrationName, callback); + }; + this.setOnRequestCallback = function (callback) { + _this.onRequestCallback = callback; + }; + this.setOnResponseCallback = function (callback) { + _this.onResponseCallback = callback; + }; + this.setOnErrorResponseCallback = function (callback) { + _this.onErrorResponseCallback = callback; + }; + this.resolve = function (path, uriTemplateParameters) { return _this.resolver.resolve(path, uriTemplateParameters); }; + this.configuration = configuration; + this.logger = configuration.logging || { + debug: function (message) { return null; }, + info: function (message) { return null; }, + warn: function (message) { return null; }, + error: function (message, err) { return null; }, + }; + this.resolver = resolver; + } + Client.create = function (configuration) { + return __awaiter(this, void 0, void 0, function () { + var resolver, client; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!configuration.instanceURL) { + throw new Error("The host is not specified"); + } + resolver = new resolver_1.Resolver(configuration.instanceURL); + client = new Client(resolver, configuration); + return [4 /*yield*/, client.getServerInformation()]; + case 1: + _a.sent(); + return [2 /*return*/, client]; + } + }); + }); + }; + Client.prototype.get = function (path, args) { + if (path === undefined) + throw new Error("path parameter was not"); + var url = this.resolveUrl(path, args); + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions + return this.dispatchRequest("GET", url); + }; + Client.prototype.getRaw = function (path, args) { + var _this = this; + var url = this.resolve(path, args); + return new Promise(function (resolve, reject) { + new apiClient_1.default({ + configuration: _this.configuration, + url: url, + method: "GET", + error: function (e) { return reject(e); }, + raw: true, + success: function (data) { return resolve(data); }, + onRequestCallback: function (r) { return _this.onRequest(r); }, + onResponseCallback: function (r) { return _this.onResponse(r); }, + onErrorResponseCallback: function (r) { return _this.onErrorResponse(r); }, + }).execute(); + }); + }; + Client.prototype.onRequest = function (clientRequestDetails) { + var details = { + url: clientRequestDetails.url, + method: clientRequestDetails.method, + }; + if (this.onRequestCallback) { + this.onRequestCallback(details); + } + this.requestSubscriptions.notifyAll(details); + }; + Client.prototype.onResponse = function (clientResponseDetails) { + var details = { + url: clientResponseDetails.url, + method: clientResponseDetails.method, + statusCode: clientResponseDetails.statusCode, + }; + if (this.onResponseCallback) { + this.onResponseCallback(details); + } + this.responseSubscriptions.notifyAll(details); + }; + Client.prototype.onErrorResponse = function (clientErrorResponseDetails) { + var details = { + url: clientErrorResponseDetails.url, + method: clientErrorResponseDetails.method, + statusCode: clientErrorResponseDetails.statusCode, + errorMessage: clientErrorResponseDetails.errorMessage, + errors: clientErrorResponseDetails.errors, + }; + if (this.onErrorResponseCallback) { + this.onErrorResponseCallback(details); + } + this.errorSubscriptions.notifyAll(details); + }; + Client.prototype.doCreate = function (path, command, args) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.doCommand("POST", path, command, args)]; + }); + }); + }; + Client.prototype.doUpdate = function (path, command, args) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.doCommand("PUT", path, command, args)]; + }); + }); + }; + Client.prototype.doCommand = function (verb, path, command, args) { + return __awaiter(this, void 0, void 0, function () { + var spaceId, spaceId, url; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!(0, spaceScopedOperation_1.isSpaceScopedOperation)(command)) return [3 /*break*/, 2]; + return [4 /*yield*/, (0, spaceResolver_1.resolveSpaceId)(this, command.spaceName)]; + case 1: + spaceId = _a.sent(); + args = __assign({ spaceId: spaceId }, args); + command = __assign({ spaceId: spaceId }, command); + _a.label = 2; + case 2: + if (!(args && (0, spaceScopedArgs_1.isSpaceScopedArgs)(args))) return [3 /*break*/, 4]; + return [4 /*yield*/, (0, spaceResolver_1.resolveSpaceId)(this, args.spaceName)]; + case 3: + spaceId = _a.sent(); + args = __assign({ spaceId: spaceId }, args); + _a.label = 4; + case 4: + url = this.resolveUrl(path, args); + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions + return [2 /*return*/, this.dispatchRequest(verb, url, command)]; + } + }); + }); + }; + Client.prototype.request = function (path, request) { + return __awaiter(this, void 0, void 0, function () { + var spaceId, url; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!(0, spaceScopedRequest_1.isSpaceScopedRequest)(request)) return [3 /*break*/, 2]; + return [4 /*yield*/, (0, spaceResolver_1.resolveSpaceId)(this, request.spaceName)]; + case 1: + spaceId = _a.sent(); + request = __assign({ spaceId: spaceId }, request); + _a.label = 2; + case 2: + url = this.resolveUrl(path, request); + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions + return [2 /*return*/, this.dispatchRequest("GET", url, null)]; + } + }); + }); + }; + Client.prototype.post = function (path, resource, args) { + var url = this.resolveUrl(path, args); + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions + return this.dispatchRequest("POST", url, resource); + }; + Client.prototype.del = function (path, args) { + return __awaiter(this, void 0, void 0, function () { + var spaceId, url; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!(args && (0, spaceScopedArgs_1.isSpaceScopedArgs)(args))) return [3 /*break*/, 2]; + return [4 /*yield*/, (0, spaceResolver_1.resolveSpaceId)(this, args.spaceName)]; + case 1: + spaceId = _a.sent(); + args = __assign({ spaceId: spaceId }, args); + _a.label = 2; + case 2: + url = this.resolve(path, args); + return [2 /*return*/, this.dispatchRequest("DELETE", url, undefined)]; + } + }); + }); + }; + Client.prototype.getServerInformation = function () { + return __awaiter(this, void 0, void 0, function () { + var _a; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + if (!!this.serverInformation) return [3 /*break*/, 2]; + _a = this; + return [4 /*yield*/, this.tryGetServerInformation()]; + case 1: + _a.serverInformation = _b.sent(); + if (!this.serverInformation) { + throw new Error("The Octopus server information could not be retrieved. Please check the configured URL."); + } + _b.label = 2; + case 2: return [2 /*return*/, this.serverInformation]; + } + }); + }); + }; + Client.prototype.tryGetServerInformation = function () { + return __awaiter(this, void 0, void 0, function () { + var rootDocument; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.get(apiLocation_1.apiLocation)]; + case 1: + rootDocument = _a.sent(); + return [2 /*return*/, rootDocument + ? { + version: rootDocument.Version, + installationId: rootDocument.InstallationId, + } + : null]; + } + }); + }); + }; + Client.prototype.dispatchRequest = function (method, url, requestBody) { + var _this = this; + return new Promise(function (resolve, reject) { + new apiClient_1.default({ + configuration: _this.configuration, + error: function (e) { return reject(e); }, + method: method, + url: url, + requestBody: requestBody, + success: function (data) { return resolve(data); }, + onRequestCallback: function (r) { return _this.onRequest(r); }, + onResponseCallback: function (r) { return _this.onResponse(r); }, + onErrorResponseCallback: function (r) { return _this.onErrorResponse(r); }, + }).execute(); + }); + }; + Client.prototype.resolveUrl = function (path, args) { + return this.resolve(path, args); + }; + return Client; +}()); +exports.Client = Client; /***/ }), @@ -2495,8 +2495,8 @@ exports.Client = Client; /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -2505,8 +2505,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -2515,8 +2515,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -2525,8 +2525,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -2535,8 +2535,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -2545,17 +2545,17 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -var Environment = /** @class */ (function () { - function Environment() { - } - Environment.isInDevelopmentMode = function () { - return !process.env.NODE_ENV || process.env.NODE_ENV !== "production"; - }; - return Environment; -}()); -exports["default"] = Environment; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var Environment = /** @class */ (function () { + function Environment() { + } + Environment.isInDevelopmentMode = function () { + return !process.env.NODE_ENV || process.env.NODE_ENV !== "production"; + }; + return Environment; +}()); +exports["default"] = Environment; /***/ }), @@ -2564,8 +2564,8 @@ exports["default"] = Environment; /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -2574,81 +2574,81 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ (function(__unused_webpack_module, exports) { "use strict"; - -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BasicRepository = void 0; -// Repositories provide a helpful abstraction around the Octopus Deploy API -var BasicRepository = /** @class */ (function () { - function BasicRepository(client, baseApiPathTemplate, listParametersTemplate) { - var _this = this; - this.takeAll = 2147483647; - this.takeDefaultPageSize = 30; - this.notifySubscribersToDataModifications = function (resource) { - Object.keys(_this.subscribersToDataModifications).forEach(function (key) { return _this.subscribersToDataModifications[key](resource); }); - return resource; - }; - this.client = client; - this.baseApiPathTemplate = baseApiPathTemplate; - this.listParametersTemplate = listParametersTemplate; - this.subscribersToDataModifications = {}; - } - BasicRepository.prototype.del = function (resource) { - var _this = this; - return this.client.del("".concat(this.baseApiPathTemplate, "/").concat(resource.Id)).then(function (d) { return _this.notifySubscribersToDataModifications(resource); }); - }; - BasicRepository.prototype.create = function (resource, args) { - var _this = this; - return this.client.doCreate(this.baseApiPathTemplate, resource, args).then(function (r) { return _this.notifySubscribersToDataModifications(r); }); - }; - BasicRepository.prototype.get = function (id) { - return this.client.get("".concat(this.baseApiPathTemplate, "/").concat(id)); - }; - BasicRepository.prototype.list = function (args) { - return this.client.request("".concat(this.baseApiPathTemplate, "{?").concat(this.listParametersTemplate, "}"), args); - }; - BasicRepository.prototype.modify = function (resource, args) { - var _this = this; - return this.client - .doUpdate("".concat(this.baseApiPathTemplate, "/").concat(resource.Id), resource, args) - .then(function (r) { return _this.notifySubscribersToDataModifications(r); }); - }; - BasicRepository.prototype.save = function (resource) { - if (isNewResource(resource)) { - return this.create(resource); - } - else { - return this.modify(resource); - } - function isTruthy(value) { - return !!value; - } - function isNewResource(resource) { - return !("Id" in resource && isTruthy(resource.Id)); - } - }; - BasicRepository.prototype.subscribeToDataModifications = function (key, callback) { - this.subscribersToDataModifications[key] = callback; - }; - BasicRepository.prototype.unsubscribeFromDataModifications = function (key) { - delete this.subscribersToDataModifications[key]; - }; - BasicRepository.prototype.extend = function (arg1, arg2) { - return __assign(__assign({}, arg1), arg2); - }; - return BasicRepository; -}()); -exports.BasicRepository = BasicRepository; + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BasicRepository = void 0; +// Repositories provide a helpful abstraction around the Octopus Deploy API +var BasicRepository = /** @class */ (function () { + function BasicRepository(client, baseApiPathTemplate, listParametersTemplate) { + var _this = this; + this.takeAll = 2147483647; + this.takeDefaultPageSize = 30; + this.notifySubscribersToDataModifications = function (resource) { + Object.keys(_this.subscribersToDataModifications).forEach(function (key) { return _this.subscribersToDataModifications[key](resource); }); + return resource; + }; + this.client = client; + this.baseApiPathTemplate = baseApiPathTemplate; + this.listParametersTemplate = listParametersTemplate; + this.subscribersToDataModifications = {}; + } + BasicRepository.prototype.del = function (resource) { + var _this = this; + return this.client.del("".concat(this.baseApiPathTemplate, "/").concat(resource.Id)).then(function (d) { return _this.notifySubscribersToDataModifications(resource); }); + }; + BasicRepository.prototype.create = function (resource, args) { + var _this = this; + return this.client.doCreate(this.baseApiPathTemplate, resource, args).then(function (r) { return _this.notifySubscribersToDataModifications(r); }); + }; + BasicRepository.prototype.get = function (id) { + return this.client.get("".concat(this.baseApiPathTemplate, "/").concat(id)); + }; + BasicRepository.prototype.list = function (args) { + return this.client.request("".concat(this.baseApiPathTemplate, "{?").concat(this.listParametersTemplate, "}"), args); + }; + BasicRepository.prototype.modify = function (resource, args) { + var _this = this; + return this.client + .doUpdate("".concat(this.baseApiPathTemplate, "/").concat(resource.Id), resource, args) + .then(function (r) { return _this.notifySubscribersToDataModifications(r); }); + }; + BasicRepository.prototype.save = function (resource) { + if (isNewResource(resource)) { + return this.create(resource); + } + else { + return this.modify(resource); + } + function isTruthy(value) { + return !!value; + } + function isNewResource(resource) { + return !("Id" in resource && isTruthy(resource.Id)); + } + }; + BasicRepository.prototype.subscribeToDataModifications = function (key, callback) { + this.subscribersToDataModifications[key] = callback; + }; + BasicRepository.prototype.unsubscribeFromDataModifications = function (key) { + delete this.subscribersToDataModifications[key]; + }; + BasicRepository.prototype.extend = function (arg1, arg2) { + return __assign(__assign({}, arg1), arg2); + }; + return BasicRepository; +}()); +exports.BasicRepository = BasicRepository; /***/ }), @@ -2657,110 +2657,110 @@ exports.BasicRepository = BasicRepository; /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "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()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BuildInformationRepository = void 0; -var overwriteMode_1 = __nccwpck_require__(7758); -var __1 = __nccwpck_require__(586); -var BuildInformationRepository = /** @class */ (function () { - function BuildInformationRepository(client, spaceName) { - this.client = client; - this.spaceName = spaceName; - } - BuildInformationRepository.prototype.push = function (buildInformation, overwriteMode) { - if (overwriteMode === void 0) { overwriteMode = overwriteMode_1.OverwriteMode.FailIfExists; } - return __awaiter(this, void 0, void 0, function () { - var tasks, _a, _b, pkg; - var e_1, _c; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - tasks = []; - try { - for (_a = __values(buildInformation.Packages), _b = _a.next(); !_b.done; _b = _a.next()) { - pkg = _b.value; - tasks.push(this.client.doCreate("".concat(__1.spaceScopedRoutePrefix, "/build-information{?overwriteMode}"), { - spaceName: buildInformation.spaceName, - PackageId: pkg.Id, - Version: pkg.Version, - OctopusBuildInformation: { - Branch: buildInformation.Branch, - BuildEnvironment: buildInformation.BuildEnvironment, - BuildNumber: buildInformation.BuildNumber, - BuildUrl: buildInformation.BuildUrl, - Commits: buildInformation.Commits.map(function (c) { return ({ Id: c.Id, Comment: c.Comment }); }), - VcsCommitNumber: buildInformation.VcsCommitNumber, - VcsRoot: buildInformation.VcsRoot, - VcsType: buildInformation.VcsType, - }, - }, { overwriteMode: overwriteMode })); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_b && !_b.done && (_c = _a.return)) _c.call(_a); - } - finally { if (e_1) throw e_1.error; } - } - return [4 /*yield*/, Promise.allSettled(tasks)]; - case 1: - _d.sent(); - return [2 /*return*/]; - } - }); - }); - }; - return BuildInformationRepository; -}()); -exports.BuildInformationRepository = BuildInformationRepository; + +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()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BuildInformationRepository = void 0; +var overwriteMode_1 = __nccwpck_require__(7758); +var __1 = __nccwpck_require__(586); +var BuildInformationRepository = /** @class */ (function () { + function BuildInformationRepository(client, spaceName) { + this.client = client; + this.spaceName = spaceName; + } + BuildInformationRepository.prototype.push = function (buildInformation, overwriteMode) { + if (overwriteMode === void 0) { overwriteMode = overwriteMode_1.OverwriteMode.FailIfExists; } + return __awaiter(this, void 0, void 0, function () { + var tasks, _a, _b, pkg; + var e_1, _c; + return __generator(this, function (_d) { + switch (_d.label) { + case 0: + tasks = []; + try { + for (_a = __values(buildInformation.Packages), _b = _a.next(); !_b.done; _b = _a.next()) { + pkg = _b.value; + tasks.push(this.client.doCreate("".concat(__1.spaceScopedRoutePrefix, "/build-information{?overwriteMode}"), { + spaceName: buildInformation.spaceName, + PackageId: pkg.Id, + Version: pkg.Version, + OctopusBuildInformation: { + Branch: buildInformation.Branch, + BuildEnvironment: buildInformation.BuildEnvironment, + BuildNumber: buildInformation.BuildNumber, + BuildUrl: buildInformation.BuildUrl, + Commits: buildInformation.Commits.map(function (c) { return ({ Id: c.Id, Comment: c.Comment }); }), + VcsCommitNumber: buildInformation.VcsCommitNumber, + VcsRoot: buildInformation.VcsRoot, + VcsType: buildInformation.VcsType, + }, + }, { overwriteMode: overwriteMode })); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_b && !_b.done && (_c = _a.return)) _c.call(_a); + } + finally { if (e_1) throw e_1.error; } + } + return [4 /*yield*/, Promise.allSettled(tasks)]; + case 1: + _d.sent(); + return [2 /*return*/]; + } + }); + }); + }; + return BuildInformationRepository; +}()); +exports.BuildInformationRepository = BuildInformationRepository; /***/ }), @@ -2769,25 +2769,25 @@ exports.BuildInformationRepository = BuildInformationRepository; /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(460), exports); -__exportStar(__nccwpck_require__(8146), exports); -__exportStar(__nccwpck_require__(2697), exports); + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(460), exports); +__exportStar(__nccwpck_require__(8146), exports); +__exportStar(__nccwpck_require__(2697), exports); /***/ }), @@ -2796,8 +2796,8 @@ __exportStar(__nccwpck_require__(2697), exports); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -2806,17 +2806,17 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PackageIdentity = void 0; -var PackageIdentity = /** @class */ (function () { - function PackageIdentity(Id, Version) { - this.Id = Id; - this.Version = Version; - } - return PackageIdentity; -}()); -exports.PackageIdentity = PackageIdentity; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PackageIdentity = void 0; +var PackageIdentity = /** @class */ (function () { + function PackageIdentity(Id, Version) { + this.Id = Id; + this.Version = Version; + } + return PackageIdentity; +}()); +exports.PackageIdentity = PackageIdentity; /***/ }), @@ -2825,8 +2825,8 @@ exports.PackageIdentity = PackageIdentity; /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -2835,8 +2835,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -2845,8 +2845,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -2855,63 +2855,63 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.EnvironmentRepository = void 0; -var __1 = __nccwpck_require__(586); -var spaceScopedBasicRepository_1 = __nccwpck_require__(3496); -var EnvironmentRepository = /** @class */ (function (_super) { - __extends(EnvironmentRepository, _super); - function EnvironmentRepository(client, spaceName) { - return _super.call(this, client, spaceName, "".concat(__1.spaceScopedRoutePrefix, "/environments"), "skip,take,ids,partialName") || this; - } - // getMetadata(environment: DeploymentEnvironment): Promise { - // return this.client.get('${spaceScopedRoutePrefix}/environments/{id}/metadata', { spaceId: environment.SpaceId, id: environment.Id }); - // } - EnvironmentRepository.prototype.sort = function (order) { - return this.client.doUpdate("".concat(this.baseApiPathTemplate, "/sortorder"), order, { spaceName: this.spaceName }); - }; - EnvironmentRepository.prototype.summary = function (args) { - return this.client.request("".concat(this.baseApiPathTemplate, "/summary{?ids,partialName,machinePartialName,roles,isDisabled,healthStatuses,commStyles,tenantIds,tenantTags,hideEmptyEnvironments,shellNames,deploymentTargetTypes}"), __assign({ spaceName: this.spaceName }, args)); - }; - EnvironmentRepository.prototype.machines = function (environment, args) { - return this.client.request("".concat(this.baseApiPathTemplate, "/").concat(environment.Id, "/machines{?skip,take,partialName,roles,isDisabled,healthStatuses,commStyles,tenantIds,tenantTags,shellNames,deploymentTargetTypes}"), __assign({ spaceName: this.spaceName }, args)); - }; - EnvironmentRepository.prototype.variablesScopedOnlyToThisEnvironment = function (environment) { - return this.client.request("".concat(__1.spaceScopedRoutePrefix, "/environments/{id}/singlyScopedVariableDetails"), { - spaceName: this.spaceName, - id: environment.Id, - }); - }; - return EnvironmentRepository; -}(spaceScopedBasicRepository_1.SpaceScopedBasicRepository)); -exports.EnvironmentRepository = EnvironmentRepository; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.EnvironmentRepository = void 0; +var __1 = __nccwpck_require__(586); +var spaceScopedBasicRepository_1 = __nccwpck_require__(3496); +var EnvironmentRepository = /** @class */ (function (_super) { + __extends(EnvironmentRepository, _super); + function EnvironmentRepository(client, spaceName) { + return _super.call(this, client, spaceName, "".concat(__1.spaceScopedRoutePrefix, "/environments"), "skip,take,ids,partialName") || this; + } + // getMetadata(environment: DeploymentEnvironment): Promise { + // return this.client.get('${spaceScopedRoutePrefix}/environments/{id}/metadata', { spaceId: environment.SpaceId, id: environment.Id }); + // } + EnvironmentRepository.prototype.sort = function (order) { + return this.client.doUpdate("".concat(this.baseApiPathTemplate, "/sortorder"), order, { spaceName: this.spaceName }); + }; + EnvironmentRepository.prototype.summary = function (args) { + return this.client.request("".concat(this.baseApiPathTemplate, "/summary{?ids,partialName,machinePartialName,roles,isDisabled,healthStatuses,commStyles,tenantIds,tenantTags,hideEmptyEnvironments,shellNames,deploymentTargetTypes}"), __assign({ spaceName: this.spaceName }, args)); + }; + EnvironmentRepository.prototype.machines = function (environment, args) { + return this.client.request("".concat(this.baseApiPathTemplate, "/").concat(environment.Id, "/machines{?skip,take,partialName,roles,isDisabled,healthStatuses,commStyles,tenantIds,tenantTags,shellNames,deploymentTargetTypes}"), __assign({ spaceName: this.spaceName }, args)); + }; + EnvironmentRepository.prototype.variablesScopedOnlyToThisEnvironment = function (environment) { + return this.client.request("".concat(__1.spaceScopedRoutePrefix, "/environments/{id}/singlyScopedVariableDetails"), { + spaceName: this.spaceName, + id: environment.Id, + }); + }; + return EnvironmentRepository; +}(spaceScopedBasicRepository_1.SpaceScopedBasicRepository)); +exports.EnvironmentRepository = EnvironmentRepository; /***/ }), @@ -2920,24 +2920,24 @@ exports.EnvironmentRepository = EnvironmentRepository; /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(2171), exports); -__exportStar(__nccwpck_require__(4520), exports); + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(2171), exports); +__exportStar(__nccwpck_require__(4520), exports); /***/ }), @@ -2946,8 +2946,8 @@ __exportStar(__nccwpck_require__(4520), exports); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -2956,8 +2956,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -2966,8 +2966,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -2976,8 +2976,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -2986,45 +2986,45 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -/* eslint-disable @typescript-eslint/consistent-type-assertions */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getFeedTypeLabel = exports.isContainerImageRegistry = exports.containerRegistryFeedTypes = exports.isOctopusProjectFeed = exports.feedTypeSupportsExtraction = exports.feedTypeCanSearchEmpty = void 0; -var feedType_1 = __nccwpck_require__(2957); -var lodash_1 = __nccwpck_require__(250); -function feedTypeCanSearchEmpty(feed) { - return ![feedType_1.FeedType.Docker, feedType_1.FeedType.AwsElasticContainerRegistry, feedType_1.FeedType.Maven, feedType_1.FeedType.GitHub].includes(feed); -} -exports.feedTypeCanSearchEmpty = feedTypeCanSearchEmpty; -function feedTypeSupportsExtraction(feed) { - // Container images can not be extracted - return ![feedType_1.FeedType.Docker, feedType_1.FeedType.AwsElasticContainerRegistry].includes(feed); -} -exports.feedTypeSupportsExtraction = feedTypeSupportsExtraction; -function isOctopusProjectFeed(feed) { - return feed === "OctopusProject"; -} -exports.isOctopusProjectFeed = isOctopusProjectFeed; -function containerRegistryFeedTypes() { - return [feedType_1.FeedType.Docker, feedType_1.FeedType.AwsElasticContainerRegistry]; -} -exports.containerRegistryFeedTypes = containerRegistryFeedTypes; -function isContainerImageRegistry(feed) { - return containerRegistryFeedTypes().includes(feed); -} -exports.isContainerImageRegistry = isContainerImageRegistry; -var getFeedTypeLabel = function (feedType) { - var requiresContainerImageRegistryFeed = feedType && feedType.length >= 1 && (0, lodash_1.every)(feedType, function (f) { return isContainerImageRegistry(f); }); - var requiresHelmChartFeed = feedType && feedType.length === 1 && feedType[0] === feedType_1.FeedType.Helm; - if (requiresContainerImageRegistryFeed) { - return "Container Image Registry"; - } - if (requiresHelmChartFeed) { - return "Helm Chart Repository"; - } - return "Package"; -}; -exports.getFeedTypeLabel = getFeedTypeLabel; + +/* eslint-disable @typescript-eslint/consistent-type-assertions */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getFeedTypeLabel = exports.isContainerImageRegistry = exports.containerRegistryFeedTypes = exports.isOctopusProjectFeed = exports.feedTypeSupportsExtraction = exports.feedTypeCanSearchEmpty = void 0; +var feedType_1 = __nccwpck_require__(2957); +var lodash_1 = __nccwpck_require__(250); +function feedTypeCanSearchEmpty(feed) { + return ![feedType_1.FeedType.Docker, feedType_1.FeedType.AwsElasticContainerRegistry, feedType_1.FeedType.Maven, feedType_1.FeedType.GitHub].includes(feed); +} +exports.feedTypeCanSearchEmpty = feedTypeCanSearchEmpty; +function feedTypeSupportsExtraction(feed) { + // Container images can not be extracted + return ![feedType_1.FeedType.Docker, feedType_1.FeedType.AwsElasticContainerRegistry].includes(feed); +} +exports.feedTypeSupportsExtraction = feedTypeSupportsExtraction; +function isOctopusProjectFeed(feed) { + return feed === "OctopusProject"; +} +exports.isOctopusProjectFeed = isOctopusProjectFeed; +function containerRegistryFeedTypes() { + return [feedType_1.FeedType.Docker, feedType_1.FeedType.AwsElasticContainerRegistry]; +} +exports.containerRegistryFeedTypes = containerRegistryFeedTypes; +function isContainerImageRegistry(feed) { + return containerRegistryFeedTypes().includes(feed); +} +exports.isContainerImageRegistry = isContainerImageRegistry; +var getFeedTypeLabel = function (feedType) { + var requiresContainerImageRegistryFeed = feedType && feedType.length >= 1 && (0, lodash_1.every)(feedType, function (f) { return isContainerImageRegistry(f); }); + var requiresHelmChartFeed = feedType && feedType.length === 1 && feedType[0] === feedType_1.FeedType.Helm; + if (requiresContainerImageRegistryFeed) { + return "Container Image Registry"; + } + if (requiresHelmChartFeed) { + return "Helm Chart Repository"; + } + return "Package"; +}; +exports.getFeedTypeLabel = getFeedTypeLabel; /***/ }), @@ -3033,34 +3033,34 @@ exports.getFeedTypeLabel = getFeedTypeLabel; /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.FeedRepository = void 0; -var __1 = __nccwpck_require__(586); -var spaceScopedBasicRepository_1 = __nccwpck_require__(3496); -var FeedRepository = /** @class */ (function (_super) { - __extends(FeedRepository, _super); - function FeedRepository(client, spaceName) { - return _super.call(this, client, spaceName, "".concat(__1.spaceScopedRoutePrefix, "/feeds"), "skip,take,ids,partialName,feedType") || this; - } - return FeedRepository; -}(spaceScopedBasicRepository_1.SpaceScopedBasicRepository)); -exports.FeedRepository = FeedRepository; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.FeedRepository = void 0; +var __1 = __nccwpck_require__(586); +var spaceScopedBasicRepository_1 = __nccwpck_require__(3496); +var FeedRepository = /** @class */ (function (_super) { + __extends(FeedRepository, _super); + function FeedRepository(client, spaceName) { + return _super.call(this, client, spaceName, "".concat(__1.spaceScopedRoutePrefix, "/feeds"), "skip,take,ids,partialName,feedType") || this; + } + return FeedRepository; +}(spaceScopedBasicRepository_1.SpaceScopedBasicRepository)); +exports.FeedRepository = FeedRepository; /***/ }), @@ -3069,20 +3069,20 @@ exports.FeedRepository = FeedRepository; /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.FeedType = void 0; -var FeedType; -(function (FeedType) { - FeedType["AwsElasticContainerRegistry"] = "AwsElasticContainerRegistry"; - FeedType["BuiltIn"] = "BuiltIn"; - FeedType["Docker"] = "Docker"; - FeedType["GitHub"] = "GitHub"; - FeedType["Helm"] = "Helm"; - FeedType["Maven"] = "Maven"; - FeedType["Nuget"] = "NuGet"; - FeedType["OctopusProject"] = "OctopusProject"; -})(FeedType = exports.FeedType || (exports.FeedType = {})); + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.FeedType = void 0; +var FeedType; +(function (FeedType) { + FeedType["AwsElasticContainerRegistry"] = "AwsElasticContainerRegistry"; + FeedType["BuiltIn"] = "BuiltIn"; + FeedType["Docker"] = "Docker"; + FeedType["GitHub"] = "GitHub"; + FeedType["Helm"] = "Helm"; + FeedType["Maven"] = "Maven"; + FeedType["Nuget"] = "NuGet"; + FeedType["OctopusProject"] = "OctopusProject"; +})(FeedType = exports.FeedType || (exports.FeedType = {})); /***/ }), @@ -3091,8 +3091,8 @@ var FeedType; /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -3101,8 +3101,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -3111,1402 +3111,1408 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(7587), exports); -__exportStar(__nccwpck_require__(283), exports); -__exportStar(__nccwpck_require__(996), exports); -__exportStar(__nccwpck_require__(6121), exports); -__exportStar(__nccwpck_require__(7423), exports); -__exportStar(__nccwpck_require__(2957), exports); -__exportStar(__nccwpck_require__(4023), exports); -__exportStar(__nccwpck_require__(6080), exports); -__exportStar(__nccwpck_require__(8150), exports); -__exportStar(__nccwpck_require__(5306), exports); -__exportStar(__nccwpck_require__(9759), exports); -__exportStar(__nccwpck_require__(6916), exports); - - -/***/ }), - -/***/ 8150: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); - - -/***/ }), - -/***/ 5306: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); - - -/***/ }), - -/***/ 9759: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); - - -/***/ }), - -/***/ 6916: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); - - -/***/ }), - -/***/ 1145: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ControlType = void 0; -var ControlType; -(function (ControlType) { - ControlType["AmazonWebServicesAccount"] = "AmazonWebServicesAccount"; - ControlType["AzureAccount"] = "AzureAccount"; - ControlType["Certificate"] = "Certificate"; - ControlType["Checkbox"] = "Checkbox"; - ControlType["Custom"] = "Custom"; - ControlType["GoogleCloudAccount"] = "GoogleCloudAccount"; - ControlType["MultiLineText"] = "MultiLineText"; - ControlType["Package"] = "Package"; - ControlType["Select"] = "Select"; - ControlType["Sensitive"] = "Sensitive"; - ControlType["SingleLineText"] = "SingleLineText"; - ControlType["StepName"] = "StepName"; - ControlType["WorkerPool"] = "WorkerPool"; -})(ControlType = exports.ControlType || (exports.ControlType = {})); - - -/***/ }), - -/***/ 669: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ConnectivityCheckResponseMessageCategory = exports.PropertyApplicabilityMode = void 0; -var PropertyApplicabilityMode; -(function (PropertyApplicabilityMode) { - PropertyApplicabilityMode["ApplicableIfHasAnyValue"] = "ApplicableIfHasAnyValue"; - PropertyApplicabilityMode["ApplicableIfHasNoValue"] = "ApplicableIfHasNoValue"; - PropertyApplicabilityMode["ApplicableIfSpecificValue"] = "ApplicableIfSpecificValue"; - PropertyApplicabilityMode["ApplicableIfNotSpecificValue"] = "ApplicableIfNotSpecificValue"; -})(PropertyApplicabilityMode = exports.PropertyApplicabilityMode || (exports.PropertyApplicabilityMode = {})); -var ConnectivityCheckResponseMessageCategory; -(function (ConnectivityCheckResponseMessageCategory) { - ConnectivityCheckResponseMessageCategory["Info"] = "Info"; - ConnectivityCheckResponseMessageCategory["Warning"] = "Warning"; - ConnectivityCheckResponseMessageCategory["Error"] = "Error"; -})(ConnectivityCheckResponseMessageCategory = exports.ConnectivityCheckResponseMessageCategory || (exports.ConnectivityCheckResponseMessageCategory = {})); - - -/***/ }), - -/***/ 599: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(1145), exports); -__exportStar(__nccwpck_require__(669), exports); - - -/***/ }), - -/***/ 5024: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(8304), exports); -__exportStar(__nccwpck_require__(7206), exports); -__exportStar(__nccwpck_require__(599), exports); -__exportStar(__nccwpck_require__(4979), exports); -__exportStar(__nccwpck_require__(5207), exports); -__exportStar(__nccwpck_require__(1682), exports); -__exportStar(__nccwpck_require__(9659), exports); -__exportStar(__nccwpck_require__(6568), exports); -__exportStar(__nccwpck_require__(1163), exports); -__exportStar(__nccwpck_require__(9925), exports); -__exportStar(__nccwpck_require__(341), exports); -__exportStar(__nccwpck_require__(3217), exports); -__exportStar(__nccwpck_require__(621), exports); -__exportStar(__nccwpck_require__(2966), exports); -__exportStar(__nccwpck_require__(9296), exports); -__exportStar(__nccwpck_require__(8318), exports); -__exportStar(__nccwpck_require__(6459), exports); -__exportStar(__nccwpck_require__(7758), exports); -__exportStar(__nccwpck_require__(800), exports); -__exportStar(__nccwpck_require__(3496), exports); + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(7587), exports); +__exportStar(__nccwpck_require__(283), exports); +__exportStar(__nccwpck_require__(996), exports); +__exportStar(__nccwpck_require__(6121), exports); +__exportStar(__nccwpck_require__(7423), exports); +__exportStar(__nccwpck_require__(2957), exports); +__exportStar(__nccwpck_require__(4023), exports); +__exportStar(__nccwpck_require__(6080), exports); +__exportStar(__nccwpck_require__(8150), exports); +__exportStar(__nccwpck_require__(5306), exports); +__exportStar(__nccwpck_require__(9759), exports); +__exportStar(__nccwpck_require__(6916), exports); /***/ }), -/***/ 4979: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 8150: +/***/ ((__unused_webpack_module, exports) => { "use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(1703), exports); -__exportStar(__nccwpck_require__(6141), exports); -__exportStar(__nccwpck_require__(5101), exports); -__exportStar(__nccwpck_require__(9310), exports); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 1703: +/***/ 5306: /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 6141: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 9759: +/***/ ((__unused_webpack_module, exports) => { "use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.LifecycleRepository = void 0; -var spaceScopedRoutePrefix_1 = __nccwpck_require__(7218); -var spaceScopedBasicRepository_1 = __nccwpck_require__(3496); -var LifecycleRepository = /** @class */ (function (_super) { - __extends(LifecycleRepository, _super); - function LifecycleRepository(client, spaceName) { - return _super.call(this, client, spaceName, "".concat(spaceScopedRoutePrefix_1.spaceScopedRoutePrefix, "/lifecycles"), "skip,take,ids,partialName") || this; - } - return LifecycleRepository; -}(spaceScopedBasicRepository_1.SpaceScopedBasicRepository)); -exports.LifecycleRepository = LifecycleRepository; + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 5101: +/***/ 6916: /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 9310: +/***/ 1145: /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RetentionUnit = void 0; -var RetentionUnit; -(function (RetentionUnit) { - RetentionUnit["Days"] = "Days"; - RetentionUnit["Items"] = "Items"; -})(RetentionUnit = exports.RetentionUnit || (exports.RetentionUnit = {})); + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ControlType = void 0; +var ControlType; +(function (ControlType) { + ControlType["AmazonWebServicesAccount"] = "AmazonWebServicesAccount"; + ControlType["AzureAccount"] = "AzureAccount"; + ControlType["Certificate"] = "Certificate"; + ControlType["Checkbox"] = "Checkbox"; + ControlType["Custom"] = "Custom"; + ControlType["GoogleCloudAccount"] = "GoogleCloudAccount"; + ControlType["MultiLineText"] = "MultiLineText"; + ControlType["Package"] = "Package"; + ControlType["Select"] = "Select"; + ControlType["Sensitive"] = "Sensitive"; + ControlType["SingleLineText"] = "SingleLineText"; + ControlType["StepName"] = "StepName"; + ControlType["WorkerPool"] = "WorkerPool"; +})(ControlType = exports.ControlType || (exports.ControlType = {})); /***/ }), -/***/ 7758: +/***/ 669: /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OverwriteMode = void 0; -var OverwriteMode; -(function (OverwriteMode) { - OverwriteMode["FailIfExists"] = "FailIfExists"; - OverwriteMode["OverwriteExisting"] = "OverwriteExisting"; - OverwriteMode["IgnoreIfExists"] = "IgnoreIfExists"; -})(OverwriteMode = exports.OverwriteMode || (exports.OverwriteMode = {})); + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ConnectivityCheckResponseMessageCategory = exports.PropertyApplicabilityMode = void 0; +var PropertyApplicabilityMode; +(function (PropertyApplicabilityMode) { + PropertyApplicabilityMode["ApplicableIfHasAnyValue"] = "ApplicableIfHasAnyValue"; + PropertyApplicabilityMode["ApplicableIfHasNoValue"] = "ApplicableIfHasNoValue"; + PropertyApplicabilityMode["ApplicableIfSpecificValue"] = "ApplicableIfSpecificValue"; + PropertyApplicabilityMode["ApplicableIfNotSpecificValue"] = "ApplicableIfNotSpecificValue"; +})(PropertyApplicabilityMode = exports.PropertyApplicabilityMode || (exports.PropertyApplicabilityMode = {})); +var ConnectivityCheckResponseMessageCategory; +(function (ConnectivityCheckResponseMessageCategory) { + ConnectivityCheckResponseMessageCategory["Info"] = "Info"; + ConnectivityCheckResponseMessageCategory["Warning"] = "Warning"; + ConnectivityCheckResponseMessageCategory["Error"] = "Error"; +})(ConnectivityCheckResponseMessageCategory = exports.ConnectivityCheckResponseMessageCategory || (exports.ConnectivityCheckResponseMessageCategory = {})); /***/ }), -/***/ 5207: +/***/ 599: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(3877), exports); -__exportStar(__nccwpck_require__(714), exports); -__exportStar(__nccwpck_require__(7857), exports); + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(1145), exports); +__exportStar(__nccwpck_require__(669), exports); /***/ }), -/***/ 3877: +/***/ 5024: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(8255), exports); -__exportStar(__nccwpck_require__(2778), exports); -__exportStar(__nccwpck_require__(3599), exports); + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(8304), exports); +__exportStar(__nccwpck_require__(7206), exports); +__exportStar(__nccwpck_require__(599), exports); +__exportStar(__nccwpck_require__(4979), exports); +__exportStar(__nccwpck_require__(5207), exports); +__exportStar(__nccwpck_require__(1682), exports); +__exportStar(__nccwpck_require__(9659), exports); +__exportStar(__nccwpck_require__(6568), exports); +__exportStar(__nccwpck_require__(1163), exports); +__exportStar(__nccwpck_require__(9925), exports); +__exportStar(__nccwpck_require__(341), exports); +__exportStar(__nccwpck_require__(3217), exports); +__exportStar(__nccwpck_require__(621), exports); +__exportStar(__nccwpck_require__(2966), exports); +__exportStar(__nccwpck_require__(9296), exports); +__exportStar(__nccwpck_require__(8318), exports); +__exportStar(__nccwpck_require__(6459), exports); +__exportStar(__nccwpck_require__(7758), exports); +__exportStar(__nccwpck_require__(800), exports); +__exportStar(__nccwpck_require__(3496), exports); /***/ }), -/***/ 8255: +/***/ 4979: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "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()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NuGetPackageBuilder = void 0; -var zipUtils_1 = __nccwpck_require__(7273); -var fs_1 = __importDefault(__nccwpck_require__(7147)); -var os_1 = __importDefault(__nccwpck_require__(2037)); -var path_1 = __importDefault(__nccwpck_require__(1017)); -var NuGetPackageBuilder = /** @class */ (function () { - function NuGetPackageBuilder() { - } - NuGetPackageBuilder.prototype.pack = function (args) { - return __awaiter(this, void 0, void 0, function () { - var archiveFilename, tmpFolder, inputFilePatterns, nuspecFile; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - archiveFilename = "".concat(args.packageId, ".").concat(args.version, ".nupkg"); - tmpFolder = os_1.default.tmpdir(); - inputFilePatterns = args.inputFilePatterns; - if (args.nuspecArgs) { - nuspecFile = path_1.default.join(tmpFolder, "".concat(args.packageId, ".nuspec")); - fs_1.default.writeFileSync(nuspecFile, '\n'); - fs_1.default.appendFileSync(nuspecFile, '\n'); - fs_1.default.appendFileSync(nuspecFile, " \n"); - fs_1.default.appendFileSync(nuspecFile, " ".concat(args.packageId, "\n")); - fs_1.default.appendFileSync(nuspecFile, " ".concat(args.version, "\n")); - fs_1.default.appendFileSync(nuspecFile, " ".concat(args.nuspecArgs.description, "\n")); - fs_1.default.appendFileSync(nuspecFile, " ".concat(args.nuspecArgs.authors.join(","), "\n")); - if (args.nuspecArgs.releaseNotes) { - fs_1.default.appendFileSync(nuspecFile, " ".concat(args.nuspecArgs.releaseNotes, "\n")); - } - fs_1.default.appendFileSync(nuspecFile, " \n"); - fs_1.default.appendFileSync(nuspecFile, "\n"); - // include the nuspec into the package - inputFilePatterns.push(nuspecFile); - } - return [4 /*yield*/, (0, zipUtils_1.doZip)(inputFilePatterns, args.outputFolder, archiveFilename, args.logger, 8, args.overwrite)]; - case 1: - _a.sent(); - return [2 /*return*/, archiveFilename]; - } - }); - }); - }; - return NuGetPackageBuilder; -}()); -exports.NuGetPackageBuilder = NuGetPackageBuilder; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(1703), exports); +__exportStar(__nccwpck_require__(6141), exports); +__exportStar(__nccwpck_require__(5101), exports); +__exportStar(__nccwpck_require__(9310), exports); /***/ }), -/***/ 2778: +/***/ 1703: /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 3599: +/***/ 6141: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "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()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ZipPackageBuilder = void 0; -var zipUtils_1 = __nccwpck_require__(7273); -var ZipPackageBuilder = /** @class */ (function () { - function ZipPackageBuilder() { - } - ZipPackageBuilder.prototype.pack = function (args) { - return __awaiter(this, void 0, void 0, function () { - var archiveFilename; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - archiveFilename = "".concat(args.packageId, ".").concat(args.version, ".zip"); - return [4 /*yield*/, (0, zipUtils_1.doZip)(args.inputFilePatterns, args.outputFolder, archiveFilename, args.logger, args.compressionLevel, args.overwrite)]; - case 1: - _a.sent(); - return [2 /*return*/, archiveFilename]; - } - }); - }); - }; - return ZipPackageBuilder; -}()); -exports.ZipPackageBuilder = ZipPackageBuilder; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.LifecycleRepository = void 0; +var spaceScopedRoutePrefix_1 = __nccwpck_require__(7218); +var spaceScopedBasicRepository_1 = __nccwpck_require__(3496); +var LifecycleRepository = /** @class */ (function (_super) { + __extends(LifecycleRepository, _super); + function LifecycleRepository(client, spaceName) { + return _super.call(this, client, spaceName, "".concat(spaceScopedRoutePrefix_1.spaceScopedRoutePrefix, "/lifecycles"), "skip,take,ids,partialName") || this; + } + return LifecycleRepository; +}(spaceScopedBasicRepository_1.SpaceScopedBasicRepository)); +exports.LifecycleRepository = LifecycleRepository; /***/ }), -/***/ 7273: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 5101: +/***/ ((__unused_webpack_module, exports) => { "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()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.doZip = void 0; -var adm_zip_1 = __importDefault(__nccwpck_require__(6761)); -var glob_1 = __nccwpck_require__(1957); -var path_1 = __importDefault(__nccwpck_require__(1017)); -var util_1 = __nccwpck_require__(3837); -var globp = (0, util_1.promisify)(glob_1.glob); -function doZip(inputFilePatterns, outputFolder, zipFilename, logger, compressionLevel, overwrite) { - var _a, _b, _c; - return __awaiter(this, void 0, void 0, function () { - var archivePath, zip, files, files_1, files_1_1, file; - var e_1, _d; - return __generator(this, function (_e) { - switch (_e.label) { - case 0: - archivePath = path_1.default.resolve(outputFolder, zipFilename); - (_a = logger.info) === null || _a === void 0 ? void 0 : _a.call(logger, "Writing to package: ".concat(archivePath, "...")); - zip = new adm_zip_1.default(); - return [4 /*yield*/, expandGlobs(inputFilePatterns)]; - case 1: - files = _e.sent(); - try { - for (files_1 = __values(files), files_1_1 = files_1.next(); !files_1_1.done; files_1_1 = files_1.next()) { - file = files_1_1.value; - (_b = logger.debug) === null || _b === void 0 ? void 0 : _b.call(logger, "Adding file: ".concat(file, "...")); - zip.addLocalFile(file); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (files_1_1 && !files_1_1.done && (_d = files_1.return)) _d.call(files_1); - } - finally { if (e_1) throw e_1.error; } - } - if (compressionLevel) { - (_c = logger.info) === null || _c === void 0 ? void 0 : _c.call(logger, "Overriding compression level: ".concat(compressionLevel)); - } - setCompressionLevel(zip, compressionLevel || 8); - return [4 /*yield*/, zip.writeZipPromise(archivePath, { overwrite: overwrite })]; - case 2: - _e.sent(); - return [2 /*return*/]; - } - }); - }); -} -exports.doZip = doZip; -var setCompressionLevel = function (zip, level) { - var entries = zip.getEntries(); - for (var i = 0; i < entries.length; i++) { - var entry = entries[i]; - if (entry) { - entry.header.method = level; - } - } -}; -function expandGlobs(filePatterns) { - return __awaiter(this, void 0, void 0, function () { - var files, filePatterns_1, filePatterns_1_1, filePattern, _a, _b, fileName, filePaths, filePaths_1, filePaths_1_1, filePath, e_2_1, e_3_1; - var e_3, _c, e_2, _d, e_4, _e; - return __generator(this, function (_f) { - switch (_f.label) { - case 0: - files = []; - _f.label = 1; - case 1: - _f.trys.push([1, 13, 14, 15]); - filePatterns_1 = __values(filePatterns), filePatterns_1_1 = filePatterns_1.next(); - _f.label = 2; - case 2: - if (!!filePatterns_1_1.done) return [3 /*break*/, 12]; - filePattern = filePatterns_1_1.value; - _f.label = 3; - case 3: - _f.trys.push([3, 9, 10, 11]); - _a = (e_2 = void 0, __values(filePattern.split(","))), _b = _a.next(); - _f.label = 4; - case 4: - if (!!_b.done) return [3 /*break*/, 8]; - fileName = _b.value; - if (!glob_1.glob.hasMagic(fileName)) return [3 /*break*/, 6]; - return [4 /*yield*/, globp(fileName)]; - case 5: - filePaths = _f.sent(); - try { - for (filePaths_1 = (e_4 = void 0, __values(filePaths)), filePaths_1_1 = filePaths_1.next(); !filePaths_1_1.done; filePaths_1_1 = filePaths_1.next()) { - filePath = filePaths_1_1.value; - files.push(filePath); - } - } - catch (e_4_1) { e_4 = { error: e_4_1 }; } - finally { - try { - if (filePaths_1_1 && !filePaths_1_1.done && (_e = filePaths_1.return)) _e.call(filePaths_1); - } - finally { if (e_4) throw e_4.error; } - } - return [3 /*break*/, 7]; - case 6: - files.push(fileName); - _f.label = 7; - case 7: - _b = _a.next(); - return [3 /*break*/, 4]; - case 8: return [3 /*break*/, 11]; - case 9: - e_2_1 = _f.sent(); - e_2 = { error: e_2_1 }; - return [3 /*break*/, 11]; - case 10: - try { - if (_b && !_b.done && (_d = _a.return)) _d.call(_a); - } - finally { if (e_2) throw e_2.error; } - return [7 /*endfinally*/]; - case 11: - filePatterns_1_1 = filePatterns_1.next(); - return [3 /*break*/, 2]; - case 12: return [3 /*break*/, 15]; - case 13: - e_3_1 = _f.sent(); - e_3 = { error: e_3_1 }; - return [3 /*break*/, 15]; - case 14: - try { - if (filePatterns_1_1 && !filePatterns_1_1.done && (_c = filePatterns_1.return)) _c.call(filePatterns_1); - } - finally { if (e_3) throw e_3.error; } - return [7 /*endfinally*/]; - case 15: return [2 /*return*/, files]; - } - }); - }); -} + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 714: +/***/ 9310: /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RetentionUnit = void 0; +var RetentionUnit; +(function (RetentionUnit) { + RetentionUnit["Days"] = "Days"; + RetentionUnit["Items"] = "Items"; +})(RetentionUnit = exports.RetentionUnit || (exports.RetentionUnit = {})); /***/ }), -/***/ 7857: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 7758: +/***/ ((__unused_webpack_module, exports) => { "use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.OverwriteMode = void 0; +var OverwriteMode; +(function (OverwriteMode) { + OverwriteMode["FailIfExists"] = "FailIfExists"; + OverwriteMode["OverwriteExisting"] = "OverwriteExisting"; + OverwriteMode["IgnoreIfExists"] = "IgnoreIfExists"; +})(OverwriteMode = exports.OverwriteMode || (exports.OverwriteMode = {})); -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -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()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PackageRepository = void 0; -var fs_1 = __nccwpck_require__(7147); -var path_1 = __importDefault(__nccwpck_require__(1017)); -var form_data_1 = __importDefault(__nccwpck_require__(4334)); -var overwriteMode_1 = __nccwpck_require__(7758); -var spaceScopedRoutePrefix_1 = __nccwpck_require__(7218); -var spaceResolver_1 = __nccwpck_require__(2054); -var PackageRepository = /** @class */ (function () { - function PackageRepository(client, spaceName) { - this.client = client; - this.spaceName = spaceName; - } - PackageRepository.prototype.get = function (packageId) { - return __awaiter(this, void 0, void 0, function () { - var response; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!packageId) { - throw new Error("Package Id was not provided"); - } - return [4 /*yield*/, this.client.request("".concat(spaceScopedRoutePrefix_1.spaceScopedRoutePrefix, "/packages{/packageId}"), { - spaceName: this.spaceName, - packageId: packageId, - })]; - case 1: - response = _a.sent(); - return [2 /*return*/, response]; - } - }); - }); - }; - PackageRepository.prototype.list = function (args) { - return __awaiter(this, void 0, void 0, function () { - var response; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.client.request("".concat(spaceScopedRoutePrefix_1.spaceScopedRoutePrefix, "/packages{/id}{?nuGetPackageId,filter,latest,skip,take,includeNotes}"), __assign({ spaceName: this.spaceName }, args))]; - case 1: - response = _a.sent(); - return [2 /*return*/, response]; - } - }); - }); - }; - PackageRepository.prototype.push = function (packages, overwriteMode) { - if (overwriteMode === void 0) { overwriteMode = overwriteMode_1.OverwriteMode.FailIfExists; } - return __awaiter(this, void 0, void 0, function () { - var spaceId, tasks, packages_1, packages_1_1, packagePath; - var e_1, _a; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: return [4 /*yield*/, (0, spaceResolver_1.resolveSpaceId)(this.client, this.spaceName)]; - case 1: - spaceId = _b.sent(); - tasks = []; - try { - for (packages_1 = __values(packages), packages_1_1 = packages_1.next(); !packages_1_1.done; packages_1_1 = packages_1.next()) { - packagePath = packages_1_1.value; - tasks.push(this.packageUpload(spaceId, packagePath, overwriteMode)); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (packages_1_1 && !packages_1_1.done && (_a = packages_1.return)) _a.call(packages_1); - } - finally { if (e_1) throw e_1.error; } - } - return [4 /*yield*/, Promise.allSettled(tasks)]; - case 2: - _b.sent(); - this.client.info("Packages uploaded"); - return [2 /*return*/]; - } - }); - }); - }; - PackageRepository.prototype.packageUpload = function (spaceId, filePath, overwriteMode) { - return __awaiter(this, void 0, void 0, function () { - var fileName; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - fileName = path_1.default.basename(filePath); - this.client.info("Uploading package, ".concat(fileName, "...")); - return [4 /*yield*/, this.upload(spaceId, filePath, fileName, overwriteMode)]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }); - }; - PackageRepository.prototype.upload = function (spaceId, filePath, fileName, overwriteMode) { - return __awaiter(this, void 0, void 0, function () { - var fd, data; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - fd = new form_data_1.default(); - return [4 /*yield*/, fs_1.promises.readFile(filePath)]; - case 1: - data = _a.sent(); - fd.append("fileToUpload", data, fileName); - return [2 /*return*/, this.client.post("".concat(spaceScopedRoutePrefix_1.spaceScopedRoutePrefix, "/packages/raw{?overwriteMode}"), fd, { overwriteMode: overwriteMode, spaceId: spaceId })]; - } - }); - }); - }; - return PackageRepository; -}()); -exports.PackageRepository = PackageRepository; + +/***/ }), + +/***/ 5207: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(3877), exports); +__exportStar(__nccwpck_require__(714), exports); +__exportStar(__nccwpck_require__(7857), exports); /***/ }), -/***/ 800: -/***/ ((__unused_webpack_module, exports) => { +/***/ 3877: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Permission = void 0; -//Enums can't be keys in a dictionary so we might need to convert this to a list of static strings -var Permission; -(function (Permission) { - Permission["None"] = "None"; - Permission["AccountCreate"] = "AccountCreate"; - Permission["AccountDelete"] = "AccountDelete"; - Permission["AccountEdit"] = "AccountEdit"; - Permission["AccountView"] = "AccountView"; - Permission["ActionTemplateCreate"] = "ActionTemplateCreate"; - Permission["ActionTemplateDelete"] = "ActionTemplateDelete"; - Permission["ActionTemplateEdit"] = "ActionTemplateEdit"; - Permission["ActionTemplateView"] = "ActionTemplateView"; - Permission["AdministerSystem"] = "AdministerSystem"; - Permission["ArtifactCreate"] = "ArtifactCreate"; - Permission["ArtifactDelete"] = "ArtifactDelete"; - Permission["ArtifactEdit"] = "ArtifactEdit"; - Permission["ArtifactView"] = "ArtifactView"; - Permission["BuildInformationAdminister"] = "BuildInformationAdminister"; - Permission["BuildInformationPush"] = "BuildInformationPush"; - Permission["BuiltInFeedAdminister"] = "BuiltInFeedAdminister"; - Permission["BuiltInFeedDownload"] = "BuiltInFeedDownload"; - Permission["BuiltInFeedPush"] = "BuiltInFeedPush"; - Permission["CertificateCreate"] = "CertificateCreate"; - Permission["CertificateDelete"] = "CertificateDelete"; - Permission["CertificateEdit"] = "CertificateEdit"; - Permission["CertificateView"] = "CertificateView"; - Permission["CertificateExportPrivateKey"] = "CertificateExportPrivateKey"; - Permission["ConfigureServer"] = "ConfigureServer"; - Permission["DefectReport"] = "DefectReport"; - Permission["DefectResolve"] = "DefectResolve"; - Permission["DeploymentCreate"] = "DeploymentCreate"; - Permission["DeploymentDelete"] = "DeploymentDelete"; - Permission["DeploymentView"] = "DeploymentView"; - Permission["EnvironmentCreate"] = "EnvironmentCreate"; - Permission["EnvironmentDelete"] = "EnvironmentDelete"; - Permission["EnvironmentEdit"] = "EnvironmentEdit"; - Permission["EnvironmentView"] = "EnvironmentView"; - Permission["EventView"] = "EventView"; - Permission["FeedEdit"] = "FeedEdit"; - Permission["FeedView"] = "FeedView"; - Permission["InterruptionSubmit"] = "InterruptionSubmit"; - Permission["InterruptionView"] = "InterruptionView"; - Permission["InterruptionViewSubmitResponsible"] = "InterruptionViewSubmitResponsible"; - Permission["LibraryVariableSetCreate"] = "LibraryVariableSetCreate"; - Permission["LibraryVariableSetDelete"] = "LibraryVariableSetDelete"; - Permission["LibraryVariableSetEdit"] = "LibraryVariableSetEdit"; - Permission["LibraryVariableSetView"] = "LibraryVariableSetView"; - Permission["LifecycleCreate"] = "LifecycleCreate"; - Permission["LifecycleDelete"] = "LifecycleDelete"; - Permission["LifecycleEdit"] = "LifecycleEdit"; - Permission["LifecycleView"] = "LifecycleView"; - Permission["ReleaseCreate"] = "ReleaseCreate"; - Permission["ReleaseView"] = "ReleaseView"; - Permission["ReleaseEdit"] = "ReleaseEdit"; - Permission["ReleaseDelete"] = "ReleaseDelete"; - Permission["MachineCreate"] = "MachineCreate"; - Permission["MachineEdit"] = "MachineEdit"; - Permission["MachineView"] = "MachineView"; - Permission["MachineDelete"] = "MachineDelete"; - Permission["MachinePolicyCreate"] = "MachinePolicyCreate"; - Permission["MachinePolicyDelete"] = "MachinePolicyDelete"; - Permission["MachinePolicyEdit"] = "MachinePolicyEdit"; - Permission["MachinePolicyView"] = "MachinePolicyView"; - Permission["ProjectGroupCreate"] = "ProjectGroupCreate"; - Permission["ProjectGroupDelete"] = "ProjectGroupDelete"; - Permission["ProjectGroupEdit"] = "ProjectGroupEdit"; - Permission["ProjectGroupView"] = "ProjectGroupView"; - Permission["TenantCreate"] = "TenantCreate"; - Permission["TenantDelete"] = "TenantDelete"; - Permission["TenantEdit"] = "TenantEdit"; - Permission["TenantView"] = "TenantView"; - Permission["TagSetCreate"] = "TagSetCreate"; - Permission["TagSetDelete"] = "TagSetDelete"; - Permission["TagSetEdit"] = "TagSetEdit"; - Permission["ProcessEdit"] = "ProcessEdit"; - Permission["ProcessView"] = "ProcessView"; - Permission["ProjectCreate"] = "ProjectCreate"; - Permission["ProjectDelete"] = "ProjectDelete"; - Permission["ProjectEdit"] = "ProjectEdit"; - Permission["ProjectView"] = "ProjectView"; - Permission["ProxyCreate"] = "ProxyCreate"; - Permission["ProxyDelete"] = "ProxyDelete"; - Permission["ProxyEdit"] = "ProxyEdit"; - Permission["ProxyView"] = "ProxyView"; - Permission["RunbookEdit"] = "RunbookEdit"; - Permission["RunbookView"] = "RunbookView"; - Permission["RunbookRunCreate"] = "RunbookRunCreate"; - Permission["RunbookRunEdit"] = "RunbookRunEdit"; - Permission["RunbookRunView"] = "RunbookRunView"; - Permission["SpaceCreate"] = "SpaceCreate"; - Permission["SpaceDelete"] = "SpaceDelete"; - Permission["SpaceEdit"] = "SpaceEdit"; - Permission["SpaceView"] = "SpaceView"; - Permission["SubscriptionCreate"] = "SubscriptionCreate"; - Permission["SubscriptionDelete"] = "SubscriptionDelete"; - Permission["SubscriptionEdit"] = "SubscriptionEdit"; - Permission["SubscriptionView"] = "SubscriptionView"; - Permission["TaskCancel"] = "TaskCancel"; - Permission["TaskCreate"] = "TaskCreate"; - Permission["TaskEdit"] = "TaskEdit"; - Permission["TaskView"] = "TaskView"; - Permission["TeamCreate"] = "TeamCreate"; - Permission["TeamDelete"] = "TeamDelete"; - Permission["TeamEdit"] = "TeamEdit"; - Permission["TeamView"] = "TeamView"; - Permission["TriggerCreate"] = "TriggerCreate"; - Permission["TriggerDelete"] = "TriggerDelete"; - Permission["TriggerEdit"] = "TriggerEdit"; - Permission["TriggerView"] = "TriggerView"; - Permission["UserEdit"] = "UserEdit"; - Permission["UserInvite"] = "UserInvite"; - Permission["UserView"] = "UserView"; - Permission["UserRoleEdit"] = "UserRoleEdit"; - Permission["UserRoleView"] = "UserRoleView"; - Permission["VariableEdit"] = "VariableEdit"; - Permission["VariableEditUnscoped"] = "VariableEditUnscoped"; - Permission["VariableView"] = "VariableView"; - Permission["VariableViewUnscoped"] = "VariableViewUnscoped"; - Permission["WorkerEdit"] = "WorkerEdit"; - Permission["WorkerView"] = "WorkerView"; -})(Permission = exports.Permission || (exports.Permission = {})); + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(8255), exports); +__exportStar(__nccwpck_require__(2778), exports); +__exportStar(__nccwpck_require__(3599), exports); /***/ }), -/***/ 1682: +/***/ 8255: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(4182), exports); -__exportStar(__nccwpck_require__(2930), exports); + +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()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NuGetPackageBuilder = void 0; +var zipUtils_1 = __nccwpck_require__(7273); +var fs_1 = __importDefault(__nccwpck_require__(7147)); +var os_1 = __importDefault(__nccwpck_require__(2037)); +var path_1 = __importDefault(__nccwpck_require__(1017)); +var NuGetPackageBuilder = /** @class */ (function () { + function NuGetPackageBuilder() { + } + NuGetPackageBuilder.prototype.pack = function (args) { + return __awaiter(this, void 0, void 0, function () { + var archiveFilename, tmpFolder, inputFilePatterns, nuspecFile; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + archiveFilename = "".concat(args.packageId, ".").concat(args.version, ".nupkg"); + tmpFolder = os_1.default.tmpdir(); + inputFilePatterns = args.inputFilePatterns; + if (args.nuspecArgs) { + nuspecFile = path_1.default.join(tmpFolder, "".concat(args.packageId, ".nuspec")); + fs_1.default.writeFileSync(nuspecFile, '\n'); + fs_1.default.appendFileSync(nuspecFile, '\n'); + fs_1.default.appendFileSync(nuspecFile, " \n"); + fs_1.default.appendFileSync(nuspecFile, " ".concat(args.packageId, "\n")); + fs_1.default.appendFileSync(nuspecFile, " ".concat(args.version, "\n")); + fs_1.default.appendFileSync(nuspecFile, " ".concat(args.nuspecArgs.description, "\n")); + fs_1.default.appendFileSync(nuspecFile, " ".concat(args.nuspecArgs.authors.join(","), "\n")); + if (args.nuspecArgs.releaseNotes) { + fs_1.default.appendFileSync(nuspecFile, " ".concat(args.nuspecArgs.releaseNotes, "\n")); + } + fs_1.default.appendFileSync(nuspecFile, " \n"); + fs_1.default.appendFileSync(nuspecFile, "\n"); + // include the nuspec into the package + inputFilePatterns.push(nuspecFile); + } + return [4 /*yield*/, (0, zipUtils_1.doZip)(inputFilePatterns, args.outputFolder, archiveFilename, args.logger, 8, args.overwrite)]; + case 1: + _a.sent(); + return [2 /*return*/, archiveFilename]; + } + }); + }); + }; + return NuGetPackageBuilder; +}()); +exports.NuGetPackageBuilder = NuGetPackageBuilder; /***/ }), -/***/ 4182: +/***/ 2778: /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 2930: +/***/ 3599: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ProjectGroupRepository = void 0; -var __1 = __nccwpck_require__(586); -var spaceScopedBasicRepository_1 = __nccwpck_require__(3496); -var ProjectGroupRepository = /** @class */ (function (_super) { - __extends(ProjectGroupRepository, _super); - function ProjectGroupRepository(client, spaceName) { - return _super.call(this, client, spaceName, "".concat(__1.spaceScopedRoutePrefix, "/projectgroups"), "skip,take,ids,partialName") || this; - } - return ProjectGroupRepository; -}(spaceScopedBasicRepository_1.SpaceScopedBasicRepository)); -exports.ProjectGroupRepository = ProjectGroupRepository; + +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()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ZipPackageBuilder = void 0; +var zipUtils_1 = __nccwpck_require__(7273); +var ZipPackageBuilder = /** @class */ (function () { + function ZipPackageBuilder() { + } + ZipPackageBuilder.prototype.pack = function (args) { + return __awaiter(this, void 0, void 0, function () { + var archiveFilename; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + archiveFilename = "".concat(args.packageId, ".").concat(args.version, ".zip"); + return [4 /*yield*/, (0, zipUtils_1.doZip)(args.inputFilePatterns, args.outputFolder, archiveFilename, args.logger, args.compressionLevel, args.overwrite)]; + case 1: + _a.sent(); + return [2 /*return*/, archiveFilename]; + } + }); + }); + }; + return ZipPackageBuilder; +}()); +exports.ZipPackageBuilder = ZipPackageBuilder; /***/ }), -/***/ 7397: -/***/ ((__unused_webpack_module, exports) => { +/***/ 7273: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +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()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.doZip = void 0; +var adm_zip_1 = __importDefault(__nccwpck_require__(6761)); +var fs_1 = __importDefault(__nccwpck_require__(7147)); +var glob_1 = __nccwpck_require__(1957); +var path_1 = __importDefault(__nccwpck_require__(1017)); +var util_1 = __nccwpck_require__(3837); +var globp = (0, util_1.promisify)(glob_1.glob); +function doZip(inputFilePatterns, outputFolder, zipFilename, logger, compressionLevel, overwrite) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function () { + var archivePath, zip, files, files_1, files_1_1, file; + var e_1, _d; + return __generator(this, function (_e) { + switch (_e.label) { + case 0: + archivePath = path_1.default.resolve(outputFolder, zipFilename); + (_a = logger.info) === null || _a === void 0 ? void 0 : _a.call(logger, "Writing to package: ".concat(archivePath, "...")); + zip = new adm_zip_1.default(); + return [4 /*yield*/, expandGlobs(inputFilePatterns)]; + case 1: + files = _e.sent(); + try { + for (files_1 = __values(files), files_1_1 = files_1.next(); !files_1_1.done; files_1_1 = files_1.next()) { + file = files_1_1.value; + (_b = logger.debug) === null || _b === void 0 ? void 0 : _b.call(logger, "Adding file: ".concat(file, "...")); + if (fs_1.default.lstatSync(file).isDirectory()) { + zip.addFile("".concat(file, "/"), new Buffer([0x00])); + } + else { + zip.addLocalFile(file, path_1.default.dirname(file)); + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (files_1_1 && !files_1_1.done && (_d = files_1.return)) _d.call(files_1); + } + finally { if (e_1) throw e_1.error; } + } + if (compressionLevel) { + (_c = logger.info) === null || _c === void 0 ? void 0 : _c.call(logger, "Overriding compression level: ".concat(compressionLevel)); + } + setCompressionLevel(zip, compressionLevel || 8); + return [4 /*yield*/, zip.writeZipPromise(archivePath, { overwrite: overwrite })]; + case 2: + _e.sent(); + return [2 /*return*/]; + } + }); + }); +} +exports.doZip = doZip; +var setCompressionLevel = function (zip, level) { + var entries = zip.getEntries(); + for (var i = 0; i < entries.length; i++) { + var entry = entries[i]; + if (entry) { + entry.header.method = level; + } + } +}; +function expandGlobs(filePatterns) { + return __awaiter(this, void 0, void 0, function () { + var files, filePatterns_1, filePatterns_1_1, filePattern, _a, _b, fileName, filePaths, filePaths_1, filePaths_1_1, filePath, e_2_1, e_3_1; + var e_3, _c, e_2, _d, e_4, _e; + return __generator(this, function (_f) { + switch (_f.label) { + case 0: + files = []; + _f.label = 1; + case 1: + _f.trys.push([1, 13, 14, 15]); + filePatterns_1 = __values(filePatterns), filePatterns_1_1 = filePatterns_1.next(); + _f.label = 2; + case 2: + if (!!filePatterns_1_1.done) return [3 /*break*/, 12]; + filePattern = filePatterns_1_1.value; + _f.label = 3; + case 3: + _f.trys.push([3, 9, 10, 11]); + _a = (e_2 = void 0, __values(filePattern.split(","))), _b = _a.next(); + _f.label = 4; + case 4: + if (!!_b.done) return [3 /*break*/, 8]; + fileName = _b.value; + if (!glob_1.glob.hasMagic(fileName)) return [3 /*break*/, 6]; + return [4 /*yield*/, globp(fileName)]; + case 5: + filePaths = _f.sent(); + try { + for (filePaths_1 = (e_4 = void 0, __values(filePaths)), filePaths_1_1 = filePaths_1.next(); !filePaths_1_1.done; filePaths_1_1 = filePaths_1.next()) { + filePath = filePaths_1_1.value; + files.push(filePath); + } + } + catch (e_4_1) { e_4 = { error: e_4_1 }; } + finally { + try { + if (filePaths_1_1 && !filePaths_1_1.done && (_e = filePaths_1.return)) _e.call(filePaths_1); + } + finally { if (e_4) throw e_4.error; } + } + return [3 /*break*/, 7]; + case 6: + files.push(fileName); + _f.label = 7; + case 7: + _b = _a.next(); + return [3 /*break*/, 4]; + case 8: return [3 /*break*/, 11]; + case 9: + e_2_1 = _f.sent(); + e_2 = { error: e_2_1 }; + return [3 /*break*/, 11]; + case 10: + try { + if (_b && !_b.done && (_d = _a.return)) _d.call(_a); + } + finally { if (e_2) throw e_2.error; } + return [7 /*endfinally*/]; + case 11: + filePatterns_1_1 = filePatterns_1.next(); + return [3 /*break*/, 2]; + case 12: return [3 /*break*/, 15]; + case 13: + e_3_1 = _f.sent(); + e_3 = { error: e_3_1 }; + return [3 /*break*/, 15]; + case 14: + try { + if (filePatterns_1_1 && !filePatterns_1_1.done && (_c = filePatterns_1.return)) _c.call(filePatterns_1); + } + finally { if (e_3) throw e_3.error; } + return [7 /*endfinally*/]; + case 15: return [2 /*return*/, files]; + } + }); + }); +} /***/ }), -/***/ 7974: +/***/ 714: /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 1067: -/***/ ((__unused_webpack_module, exports) => { +/***/ 7857: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +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()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PackageRepository = void 0; +var fs_1 = __nccwpck_require__(7147); +var path_1 = __importDefault(__nccwpck_require__(1017)); +var form_data_1 = __importDefault(__nccwpck_require__(4334)); +var overwriteMode_1 = __nccwpck_require__(7758); +var spaceScopedRoutePrefix_1 = __nccwpck_require__(7218); +var spaceResolver_1 = __nccwpck_require__(2054); +var PackageRepository = /** @class */ (function () { + function PackageRepository(client, spaceName) { + this.client = client; + this.spaceName = spaceName; + } + PackageRepository.prototype.get = function (packageId) { + return __awaiter(this, void 0, void 0, function () { + var response; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!packageId) { + throw new Error("Package Id was not provided"); + } + return [4 /*yield*/, this.client.request("".concat(spaceScopedRoutePrefix_1.spaceScopedRoutePrefix, "/packages{/packageId}"), { + spaceName: this.spaceName, + packageId: packageId, + })]; + case 1: + response = _a.sent(); + return [2 /*return*/, response]; + } + }); + }); + }; + PackageRepository.prototype.list = function (args) { + return __awaiter(this, void 0, void 0, function () { + var response; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.client.request("".concat(spaceScopedRoutePrefix_1.spaceScopedRoutePrefix, "/packages{/id}{?nuGetPackageId,filter,latest,skip,take,includeNotes}"), __assign({ spaceName: this.spaceName }, args))]; + case 1: + response = _a.sent(); + return [2 /*return*/, response]; + } + }); + }); + }; + PackageRepository.prototype.push = function (packages, overwriteMode) { + if (overwriteMode === void 0) { overwriteMode = overwriteMode_1.OverwriteMode.FailIfExists; } + return __awaiter(this, void 0, void 0, function () { + var spaceId, tasks, packages_1, packages_1_1, packagePath; + var e_1, _a; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: return [4 /*yield*/, (0, spaceResolver_1.resolveSpaceId)(this.client, this.spaceName)]; + case 1: + spaceId = _b.sent(); + tasks = []; + try { + for (packages_1 = __values(packages), packages_1_1 = packages_1.next(); !packages_1_1.done; packages_1_1 = packages_1.next()) { + packagePath = packages_1_1.value; + tasks.push(this.packageUpload(spaceId, packagePath, overwriteMode)); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (packages_1_1 && !packages_1_1.done && (_a = packages_1.return)) _a.call(packages_1); + } + finally { if (e_1) throw e_1.error; } + } + return [4 /*yield*/, Promise.allSettled(tasks)]; + case 2: + _b.sent(); + this.client.info("Packages uploaded"); + return [2 /*return*/]; + } + }); + }); + }; + PackageRepository.prototype.packageUpload = function (spaceId, filePath, overwriteMode) { + return __awaiter(this, void 0, void 0, function () { + var fileName; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + fileName = path_1.default.basename(filePath); + this.client.info("Uploading package, ".concat(fileName, "...")); + return [4 /*yield*/, this.upload(spaceId, filePath, fileName, overwriteMode)]; + case 1: + _a.sent(); + return [2 /*return*/]; + } + }); + }); + }; + PackageRepository.prototype.upload = function (spaceId, filePath, fileName, overwriteMode) { + return __awaiter(this, void 0, void 0, function () { + var fd, data; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + fd = new form_data_1.default(); + return [4 /*yield*/, fs_1.promises.readFile(filePath)]; + case 1: + data = _a.sent(); + fd.append("fileToUpload", data, fileName); + return [2 /*return*/, this.client.post("".concat(spaceScopedRoutePrefix_1.spaceScopedRoutePrefix, "/packages/raw{?overwriteMode}"), fd, { overwriteMode: overwriteMode, spaceId: spaceId })]; + } + }); + }); + }; + return PackageRepository; +}()); +exports.PackageRepository = PackageRepository; /***/ }), -/***/ 5187: +/***/ 800: /***/ ((__unused_webpack_module, exports) => { "use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Permission = void 0; +//Enums can't be keys in a dictionary so we might need to convert this to a list of static strings +var Permission; +(function (Permission) { + Permission["None"] = "None"; + Permission["AccountCreate"] = "AccountCreate"; + Permission["AccountDelete"] = "AccountDelete"; + Permission["AccountEdit"] = "AccountEdit"; + Permission["AccountView"] = "AccountView"; + Permission["ActionTemplateCreate"] = "ActionTemplateCreate"; + Permission["ActionTemplateDelete"] = "ActionTemplateDelete"; + Permission["ActionTemplateEdit"] = "ActionTemplateEdit"; + Permission["ActionTemplateView"] = "ActionTemplateView"; + Permission["AdministerSystem"] = "AdministerSystem"; + Permission["ArtifactCreate"] = "ArtifactCreate"; + Permission["ArtifactDelete"] = "ArtifactDelete"; + Permission["ArtifactEdit"] = "ArtifactEdit"; + Permission["ArtifactView"] = "ArtifactView"; + Permission["BuildInformationAdminister"] = "BuildInformationAdminister"; + Permission["BuildInformationPush"] = "BuildInformationPush"; + Permission["BuiltInFeedAdminister"] = "BuiltInFeedAdminister"; + Permission["BuiltInFeedDownload"] = "BuiltInFeedDownload"; + Permission["BuiltInFeedPush"] = "BuiltInFeedPush"; + Permission["CertificateCreate"] = "CertificateCreate"; + Permission["CertificateDelete"] = "CertificateDelete"; + Permission["CertificateEdit"] = "CertificateEdit"; + Permission["CertificateView"] = "CertificateView"; + Permission["CertificateExportPrivateKey"] = "CertificateExportPrivateKey"; + Permission["ConfigureServer"] = "ConfigureServer"; + Permission["DefectReport"] = "DefectReport"; + Permission["DefectResolve"] = "DefectResolve"; + Permission["DeploymentCreate"] = "DeploymentCreate"; + Permission["DeploymentDelete"] = "DeploymentDelete"; + Permission["DeploymentView"] = "DeploymentView"; + Permission["EnvironmentCreate"] = "EnvironmentCreate"; + Permission["EnvironmentDelete"] = "EnvironmentDelete"; + Permission["EnvironmentEdit"] = "EnvironmentEdit"; + Permission["EnvironmentView"] = "EnvironmentView"; + Permission["EventView"] = "EventView"; + Permission["FeedEdit"] = "FeedEdit"; + Permission["FeedView"] = "FeedView"; + Permission["InterruptionSubmit"] = "InterruptionSubmit"; + Permission["InterruptionView"] = "InterruptionView"; + Permission["InterruptionViewSubmitResponsible"] = "InterruptionViewSubmitResponsible"; + Permission["LibraryVariableSetCreate"] = "LibraryVariableSetCreate"; + Permission["LibraryVariableSetDelete"] = "LibraryVariableSetDelete"; + Permission["LibraryVariableSetEdit"] = "LibraryVariableSetEdit"; + Permission["LibraryVariableSetView"] = "LibraryVariableSetView"; + Permission["LifecycleCreate"] = "LifecycleCreate"; + Permission["LifecycleDelete"] = "LifecycleDelete"; + Permission["LifecycleEdit"] = "LifecycleEdit"; + Permission["LifecycleView"] = "LifecycleView"; + Permission["ReleaseCreate"] = "ReleaseCreate"; + Permission["ReleaseView"] = "ReleaseView"; + Permission["ReleaseEdit"] = "ReleaseEdit"; + Permission["ReleaseDelete"] = "ReleaseDelete"; + Permission["MachineCreate"] = "MachineCreate"; + Permission["MachineEdit"] = "MachineEdit"; + Permission["MachineView"] = "MachineView"; + Permission["MachineDelete"] = "MachineDelete"; + Permission["MachinePolicyCreate"] = "MachinePolicyCreate"; + Permission["MachinePolicyDelete"] = "MachinePolicyDelete"; + Permission["MachinePolicyEdit"] = "MachinePolicyEdit"; + Permission["MachinePolicyView"] = "MachinePolicyView"; + Permission["ProjectGroupCreate"] = "ProjectGroupCreate"; + Permission["ProjectGroupDelete"] = "ProjectGroupDelete"; + Permission["ProjectGroupEdit"] = "ProjectGroupEdit"; + Permission["ProjectGroupView"] = "ProjectGroupView"; + Permission["TenantCreate"] = "TenantCreate"; + Permission["TenantDelete"] = "TenantDelete"; + Permission["TenantEdit"] = "TenantEdit"; + Permission["TenantView"] = "TenantView"; + Permission["TagSetCreate"] = "TagSetCreate"; + Permission["TagSetDelete"] = "TagSetDelete"; + Permission["TagSetEdit"] = "TagSetEdit"; + Permission["ProcessEdit"] = "ProcessEdit"; + Permission["ProcessView"] = "ProcessView"; + Permission["ProjectCreate"] = "ProjectCreate"; + Permission["ProjectDelete"] = "ProjectDelete"; + Permission["ProjectEdit"] = "ProjectEdit"; + Permission["ProjectView"] = "ProjectView"; + Permission["ProxyCreate"] = "ProxyCreate"; + Permission["ProxyDelete"] = "ProxyDelete"; + Permission["ProxyEdit"] = "ProxyEdit"; + Permission["ProxyView"] = "ProxyView"; + Permission["RunbookEdit"] = "RunbookEdit"; + Permission["RunbookView"] = "RunbookView"; + Permission["RunbookRunCreate"] = "RunbookRunCreate"; + Permission["RunbookRunEdit"] = "RunbookRunEdit"; + Permission["RunbookRunView"] = "RunbookRunView"; + Permission["SpaceCreate"] = "SpaceCreate"; + Permission["SpaceDelete"] = "SpaceDelete"; + Permission["SpaceEdit"] = "SpaceEdit"; + Permission["SpaceView"] = "SpaceView"; + Permission["SubscriptionCreate"] = "SubscriptionCreate"; + Permission["SubscriptionDelete"] = "SubscriptionDelete"; + Permission["SubscriptionEdit"] = "SubscriptionEdit"; + Permission["SubscriptionView"] = "SubscriptionView"; + Permission["TaskCancel"] = "TaskCancel"; + Permission["TaskCreate"] = "TaskCreate"; + Permission["TaskEdit"] = "TaskEdit"; + Permission["TaskView"] = "TaskView"; + Permission["TeamCreate"] = "TeamCreate"; + Permission["TeamDelete"] = "TeamDelete"; + Permission["TeamEdit"] = "TeamEdit"; + Permission["TeamView"] = "TeamView"; + Permission["TriggerCreate"] = "TriggerCreate"; + Permission["TriggerDelete"] = "TriggerDelete"; + Permission["TriggerEdit"] = "TriggerEdit"; + Permission["TriggerView"] = "TriggerView"; + Permission["UserEdit"] = "UserEdit"; + Permission["UserInvite"] = "UserInvite"; + Permission["UserView"] = "UserView"; + Permission["UserRoleEdit"] = "UserRoleEdit"; + Permission["UserRoleView"] = "UserRoleView"; + Permission["VariableEdit"] = "VariableEdit"; + Permission["VariableEditUnscoped"] = "VariableEditUnscoped"; + Permission["VariableView"] = "VariableView"; + Permission["VariableViewUnscoped"] = "VariableViewUnscoped"; + Permission["WorkerEdit"] = "WorkerEdit"; + Permission["WorkerView"] = "WorkerView"; +})(Permission = exports.Permission || (exports.Permission = {})); -Object.defineProperty(exports, "__esModule", ({ value: true })); + +/***/ }), + +/***/ 1682: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(4182), exports); +__exportStar(__nccwpck_require__(2930), exports); /***/ }), -/***/ 4143: +/***/ 4182: /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 9075: +/***/ 2930: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ProjectGroupRepository = void 0; +var __1 = __nccwpck_require__(586); +var spaceScopedBasicRepository_1 = __nccwpck_require__(3496); +var ProjectGroupRepository = /** @class */ (function (_super) { + __extends(ProjectGroupRepository, _super); + function ProjectGroupRepository(client, spaceName) { + return _super.call(this, client, spaceName, "".concat(__1.spaceScopedRoutePrefix, "/projectgroups"), "skip,take,ids,partialName") || this; + } + return ProjectGroupRepository; +}(spaceScopedBasicRepository_1.SpaceScopedBasicRepository)); +exports.ProjectGroupRepository = ProjectGroupRepository; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.InitialisePrimaryPackageReference = exports.SetPrimaryPackageReference = exports.SetNamedPackageReference = exports.GetNamedPackageReferences = exports.IsNamedPackageReference = exports.GetPrimaryPackageReference = exports.HasManualInterventionResponsibleTeams = exports.PackageReferenceNamesMatch = exports.RemovePrimaryPackageReference = exports.IsPrimaryPackageReference = exports.IsDeployReleaseAction = void 0; -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -var _ = __importStar(__nccwpck_require__(250)); -var feeds_1 = __nccwpck_require__(4962); -var packageAcquisitionLocation_1 = __nccwpck_require__(7266); -var packageReference_1 = __nccwpck_require__(7708); -function parseCSV(val) { - if (!val || val === "") { - return []; - } - return val.split(","); -} -function IsDeployReleaseAction(action) { - return !!action.Properties["Octopus.Action.DeployRelease.ProjectId"]; -} -exports.IsDeployReleaseAction = IsDeployReleaseAction; -function IsPrimaryPackageReference(pkg) { - return !pkg.Name; -} -exports.IsPrimaryPackageReference = IsPrimaryPackageReference; -function RemovePrimaryPackageReference(packages) { - return _.filter(packages, function (pkg) { return !IsPrimaryPackageReference(pkg); }); -} -exports.RemovePrimaryPackageReference = RemovePrimaryPackageReference; -// Returns true if the names match, where null and empty string are equivalent -function PackageReferenceNamesMatch(nameA, nameB) { - if (!nameA) { - return !nameB; - } - return nameA === nameB; -} -exports.PackageReferenceNamesMatch = PackageReferenceNamesMatch; -function HasManualInterventionResponsibleTeams(action) { - // eslint-disable-next-line @typescript-eslint/consistent-type-assertions - return _.some(parseCSV(action.Properties["Octopus.Action.Manual.ResponsibleTeamIds"])); -} -exports.HasManualInterventionResponsibleTeams = HasManualInterventionResponsibleTeams; -function GetPrimaryPackageReference(packages) { - return packages === null || packages === void 0 ? void 0 : packages.find(function (pkg) { return IsPrimaryPackageReference(pkg); }); -} -exports.GetPrimaryPackageReference = GetPrimaryPackageReference; -function IsNamedPackageReference(pkg) { - return !!pkg.Name; -} -exports.IsNamedPackageReference = IsNamedPackageReference; -function GetNamedPackageReferences(packages) { - return RemovePrimaryPackageReference(packages); -} -exports.GetNamedPackageReferences = GetNamedPackageReferences; -function SetNamedPackageReference(name, updated, packages) { - return _.map(packages, function (pkg) { - if (!PackageReferenceNamesMatch(name, pkg.Name)) { - return pkg; - } - return __assign(__assign({}, pkg), updated); - }); -} -exports.SetNamedPackageReference = SetNamedPackageReference; -function SetPrimaryPackageReference(updated, packages) { - return _.map(packages, function (pkg) { - if (!IsPrimaryPackageReference(pkg)) { - return pkg; - } - return __assign(__assign({}, pkg), updated); - }); -} -exports.SetPrimaryPackageReference = SetPrimaryPackageReference; -function InitialisePrimaryPackageReference(packages, feeds, itemsKeyedBy) { - var primaryPackage = GetPrimaryPackageReference(packages); - if (primaryPackage) { - if (!primaryPackage.Properties.SelectionMode) { - primaryPackage.Properties.SelectionMode = packageReference_1.PackageSelectionMode.Immediate; - } - return __spreadArray([], __read(packages), false); - } - var packagesWithoutDefault = RemovePrimaryPackageReference(packages); - var builtInFeed = feeds.find(function (f) { return f.FeedType === feeds_1.FeedType.BuiltIn; }); - var builtInFeedIdOrName = builtInFeed && builtInFeed[itemsKeyedBy]; - return __spreadArray([ - { - Id: null, - PackageId: null, - FeedId: builtInFeedIdOrName, - AcquisitionLocation: packageAcquisitionLocation_1.PackageAcquisitionLocation.Server, - Properties: { - SelectionMode: packageReference_1.PackageSelectionMode.Immediate, - }, - } - ], __read(packagesWithoutDefault), false); -} -exports.InitialisePrimaryPackageReference = InitialisePrimaryPackageReference; + +/***/ }), + +/***/ 7397: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 6989: +/***/ 7974: /***/ ((__unused_webpack_module, exports) => { "use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); -Object.defineProperty(exports, "__esModule", ({ value: true })); + +/***/ }), + +/***/ 1067: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 929: +/***/ 5187: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); + + +/***/ }), + +/***/ 4143: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); + + +/***/ }), + +/***/ 9075: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.InitialisePrimaryPackageReference = exports.SetPrimaryPackageReference = exports.SetNamedPackageReference = exports.GetNamedPackageReferences = exports.IsNamedPackageReference = exports.GetPrimaryPackageReference = exports.HasManualInterventionResponsibleTeams = exports.PackageReferenceNamesMatch = exports.RemovePrimaryPackageReference = exports.IsPrimaryPackageReference = exports.IsDeployReleaseAction = void 0; +/* eslint-disable @typescript-eslint/no-non-null-assertion */ +var _ = __importStar(__nccwpck_require__(250)); +var feeds_1 = __nccwpck_require__(4962); +var packageAcquisitionLocation_1 = __nccwpck_require__(7266); +var packageReference_1 = __nccwpck_require__(7708); +function parseCSV(val) { + if (!val || val === "") { + return []; + } + return val.split(","); +} +function IsDeployReleaseAction(action) { + return !!action.Properties["Octopus.Action.DeployRelease.ProjectId"]; +} +exports.IsDeployReleaseAction = IsDeployReleaseAction; +function IsPrimaryPackageReference(pkg) { + return !pkg.Name; +} +exports.IsPrimaryPackageReference = IsPrimaryPackageReference; +function RemovePrimaryPackageReference(packages) { + return _.filter(packages, function (pkg) { return !IsPrimaryPackageReference(pkg); }); +} +exports.RemovePrimaryPackageReference = RemovePrimaryPackageReference; +// Returns true if the names match, where null and empty string are equivalent +function PackageReferenceNamesMatch(nameA, nameB) { + if (!nameA) { + return !nameB; + } + return nameA === nameB; +} +exports.PackageReferenceNamesMatch = PackageReferenceNamesMatch; +function HasManualInterventionResponsibleTeams(action) { + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions + return _.some(parseCSV(action.Properties["Octopus.Action.Manual.ResponsibleTeamIds"])); +} +exports.HasManualInterventionResponsibleTeams = HasManualInterventionResponsibleTeams; +function GetPrimaryPackageReference(packages) { + return packages === null || packages === void 0 ? void 0 : packages.find(function (pkg) { return IsPrimaryPackageReference(pkg); }); +} +exports.GetPrimaryPackageReference = GetPrimaryPackageReference; +function IsNamedPackageReference(pkg) { + return !!pkg.Name; +} +exports.IsNamedPackageReference = IsNamedPackageReference; +function GetNamedPackageReferences(packages) { + return RemovePrimaryPackageReference(packages); +} +exports.GetNamedPackageReferences = GetNamedPackageReferences; +function SetNamedPackageReference(name, updated, packages) { + return _.map(packages, function (pkg) { + if (!PackageReferenceNamesMatch(name, pkg.Name)) { + return pkg; + } + return __assign(__assign({}, pkg), updated); + }); +} +exports.SetNamedPackageReference = SetNamedPackageReference; +function SetPrimaryPackageReference(updated, packages) { + return _.map(packages, function (pkg) { + if (!IsPrimaryPackageReference(pkg)) { + return pkg; + } + return __assign(__assign({}, pkg), updated); + }); +} +exports.SetPrimaryPackageReference = SetPrimaryPackageReference; +function InitialisePrimaryPackageReference(packages, feeds, itemsKeyedBy) { + var primaryPackage = GetPrimaryPackageReference(packages); + if (primaryPackage) { + if (!primaryPackage.Properties.SelectionMode) { + primaryPackage.Properties.SelectionMode = packageReference_1.PackageSelectionMode.Immediate; + } + return __spreadArray([], __read(packages), false); + } + var packagesWithoutDefault = RemovePrimaryPackageReference(packages); + var builtInFeed = feeds.find(function (f) { return f.FeedType === feeds_1.FeedType.BuiltIn; }); + var builtInFeedIdOrName = builtInFeed && builtInFeed[itemsKeyedBy]; + return __spreadArray([ + { + Id: null, + PackageId: null, + FeedId: builtInFeedIdOrName, + AcquisitionLocation: packageAcquisitionLocation_1.PackageAcquisitionLocation.Server, + Properties: { + SelectionMode: packageReference_1.PackageSelectionMode.Immediate, + }, + } + ], __read(packagesWithoutDefault), false); +} +exports.InitialisePrimaryPackageReference = InitialisePrimaryPackageReference; + + +/***/ }), + +/***/ 6989: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.deploymentActionPackages = exports.displayName = void 0; -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -var _ = __importStar(__nccwpck_require__(250)); -function displayName(pkg) { - return !!pkg.PackageReference ? "".concat(pkg.DeploymentAction, "/").concat(pkg.PackageReference) : pkg.DeploymentAction; -} -exports.displayName = displayName; -function deploymentActionPackages(actions) { - return _.chain(actions) - .flatMap(function (action) { - return _.map(action.Packages, function (pkg) { return ({ - DeploymentAction: action.Name, - PackageReference: pkg.Name, - }); }); - }) - .value(); -} -exports.deploymentActionPackages = deploymentActionPackages; + +/***/ }), + +/***/ 929: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.deploymentActionPackages = exports.displayName = void 0; +/* eslint-disable @typescript-eslint/no-non-null-assertion */ +var _ = __importStar(__nccwpck_require__(250)); +function displayName(pkg) { + return !!pkg.PackageReference ? "".concat(pkg.DeploymentAction, "/").concat(pkg.PackageReference) : pkg.DeploymentAction; +} +exports.displayName = displayName; +function deploymentActionPackages(actions) { + return _.chain(actions) + .flatMap(function (action) { + return _.map(action.Packages, function (pkg) { return ({ + DeploymentAction: action.Name, + PackageReference: pkg.Name, + }); }); + }) + .value(); +} +exports.deploymentActionPackages = deploymentActionPackages; /***/ }), @@ -4515,20 +4521,20 @@ exports.deploymentActionPackages = deploymentActionPackages; /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isDeploymentProcess = void 0; -var utils_1 = __nccwpck_require__(7132); -var runbookProcess_1 = __nccwpck_require__(1379); -function isDeploymentProcess(resource) { - if (resource === null || resource === undefined) { - return false; - } - // eslint-disable-next-line @typescript-eslint/consistent-type-assertions - var converted = resource; - return !(0, runbookProcess_1.isRunbookProcess)(resource) && converted.Version !== undefined && (0, utils_1.typeSafeHasOwnProperty)(converted, "Version"); -} -exports.isDeploymentProcess = isDeploymentProcess; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isDeploymentProcess = void 0; +var utils_1 = __nccwpck_require__(7132); +var runbookProcess_1 = __nccwpck_require__(1379); +function isDeploymentProcess(resource) { + if (resource === null || resource === undefined) { + return false; + } + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions + var converted = resource; + return !(0, runbookProcess_1.isRunbookProcess)(resource) && converted.Version !== undefined && (0, utils_1.typeSafeHasOwnProperty)(converted, "Version"); +} +exports.isDeploymentProcess = isDeploymentProcess; /***/ }), @@ -4537,120 +4543,120 @@ exports.isDeploymentProcess = isDeploymentProcess; /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "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()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DeploymentProcessRepository = void 0; -var __1 = __nccwpck_require__(586); -var DeploymentProcessRepository = /** @class */ (function () { - function DeploymentProcessRepository(client, spaceName) { - this.client = client; - this.spaceName = spaceName; - } - DeploymentProcessRepository.prototype.get = function (project) { - return __awaiter(this, void 0, void 0, function () { - var response; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.client.request("".concat(__1.spaceScopedRoutePrefix, "/projects/{projectId}/deploymentprocesses"), { - spaceName: this.spaceName, - projectId: project.Id, - })]; - case 1: - response = _a.sent(); - return [2 /*return*/, response]; - } - }); - }); - }; - DeploymentProcessRepository.prototype.getByGitRef = function (project, gitRef) { - return __awaiter(this, void 0, void 0, function () { - var response; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.client.request("".concat(__1.spaceScopedRoutePrefix, "/projects/{projectId}/{gitRef}/deploymentprocesses"), { - spaceName: this.spaceName, - projectId: project.Id, - gitRef: gitRef, - })]; - case 1: - response = _a.sent(); - return [2 /*return*/, response]; - } - }); - }); - }; - DeploymentProcessRepository.prototype.update = function (project, deploymentProcess) { - return __awaiter(this, void 0, void 0, function () { - var response; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.client.doUpdate("".concat(__1.spaceScopedRoutePrefix, "/projects/{projectId}/deploymentprocesses"), deploymentProcess, { - spaceName: this.spaceName, - projectId: project.Id, - })]; - case 1: - response = _a.sent(); - return [2 /*return*/, response]; - } - }); - }); - }; - DeploymentProcessRepository.prototype.updateByGitRef = function (project, deploymentProcess, gitRef) { - return __awaiter(this, void 0, void 0, function () { - var response; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.client.doUpdate("".concat(__1.spaceScopedRoutePrefix, "/projects/{projectId}/{gitRef}/deploymentprocesses"), deploymentProcess, { - spaceName: this.spaceName, - projectId: project.Id, - gitRef: gitRef, - })]; - case 1: - response = _a.sent(); - return [2 /*return*/, response]; - } - }); - }); - }; - return DeploymentProcessRepository; -}()); -exports.DeploymentProcessRepository = DeploymentProcessRepository; + +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()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeploymentProcessRepository = void 0; +var __1 = __nccwpck_require__(586); +var DeploymentProcessRepository = /** @class */ (function () { + function DeploymentProcessRepository(client, spaceName) { + this.client = client; + this.spaceName = spaceName; + } + DeploymentProcessRepository.prototype.get = function (project) { + return __awaiter(this, void 0, void 0, function () { + var response; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.client.request("".concat(__1.spaceScopedRoutePrefix, "/projects/{projectId}/deploymentprocesses"), { + spaceName: this.spaceName, + projectId: project.Id, + })]; + case 1: + response = _a.sent(); + return [2 /*return*/, response]; + } + }); + }); + }; + DeploymentProcessRepository.prototype.getByGitRef = function (project, gitRef) { + return __awaiter(this, void 0, void 0, function () { + var response; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.client.request("".concat(__1.spaceScopedRoutePrefix, "/projects/{projectId}/{gitRef}/deploymentprocesses"), { + spaceName: this.spaceName, + projectId: project.Id, + gitRef: gitRef, + })]; + case 1: + response = _a.sent(); + return [2 /*return*/, response]; + } + }); + }); + }; + DeploymentProcessRepository.prototype.update = function (project, deploymentProcess) { + return __awaiter(this, void 0, void 0, function () { + var response; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.client.doUpdate("".concat(__1.spaceScopedRoutePrefix, "/projects/{projectId}/deploymentprocesses"), deploymentProcess, { + spaceName: this.spaceName, + projectId: project.Id, + })]; + case 1: + response = _a.sent(); + return [2 /*return*/, response]; + } + }); + }); + }; + DeploymentProcessRepository.prototype.updateByGitRef = function (project, deploymentProcess, gitRef) { + return __awaiter(this, void 0, void 0, function () { + var response; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.client.doUpdate("".concat(__1.spaceScopedRoutePrefix, "/projects/{projectId}/{gitRef}/deploymentprocesses"), deploymentProcess, { + spaceName: this.spaceName, + projectId: project.Id, + gitRef: gitRef, + })]; + case 1: + response = _a.sent(); + return [2 /*return*/, response]; + } + }); + }); + }; + return DeploymentProcessRepository; +}()); +exports.DeploymentProcessRepository = DeploymentProcessRepository; /***/ }), @@ -4659,15 +4665,15 @@ exports.DeploymentProcessRepository = DeploymentProcessRepository; /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.GuidedFailureMode = void 0; -var GuidedFailureMode; -(function (GuidedFailureMode) { - GuidedFailureMode["EnvironmentDefault"] = "EnvironmentDefault"; - GuidedFailureMode["Off"] = "Off"; - GuidedFailureMode["On"] = "On"; -})(GuidedFailureMode = exports.GuidedFailureMode || (exports.GuidedFailureMode = {})); + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GuidedFailureMode = void 0; +var GuidedFailureMode; +(function (GuidedFailureMode) { + GuidedFailureMode["EnvironmentDefault"] = "EnvironmentDefault"; + GuidedFailureMode["Off"] = "Off"; + GuidedFailureMode["On"] = "On"; +})(GuidedFailureMode = exports.GuidedFailureMode || (exports.GuidedFailureMode = {})); /***/ }), @@ -4676,27 +4682,27 @@ var GuidedFailureMode; /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PackageRequirement = exports.RunCondition = exports.StartTrigger = void 0; -var StartTrigger; -(function (StartTrigger) { - StartTrigger["StartWithPrevious"] = "StartWithPrevious"; - StartTrigger["StartAfterPrevious"] = "StartAfterPrevious"; -})(StartTrigger = exports.StartTrigger || (exports.StartTrigger = {})); -var RunCondition; -(function (RunCondition) { - RunCondition["Success"] = "Success"; - RunCondition["Failure"] = "Failure"; - RunCondition["Always"] = "Always"; - RunCondition["Variable"] = "Variable"; -})(RunCondition = exports.RunCondition || (exports.RunCondition = {})); -var PackageRequirement; -(function (PackageRequirement) { - PackageRequirement["LetOctopusDecide"] = "LetOctopusDecide"; - PackageRequirement["BeforePackageAcquisition"] = "BeforePackageAcquisition"; - PackageRequirement["AfterPackageAcquisition"] = "AfterPackageAcquisition"; -})(PackageRequirement = exports.PackageRequirement || (exports.PackageRequirement = {})); + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PackageRequirement = exports.RunCondition = exports.StartTrigger = void 0; +var StartTrigger; +(function (StartTrigger) { + StartTrigger["StartWithPrevious"] = "StartWithPrevious"; + StartTrigger["StartAfterPrevious"] = "StartAfterPrevious"; +})(StartTrigger = exports.StartTrigger || (exports.StartTrigger = {})); +var RunCondition; +(function (RunCondition) { + RunCondition["Success"] = "Success"; + RunCondition["Failure"] = "Failure"; + RunCondition["Always"] = "Always"; + RunCondition["Variable"] = "Variable"; +})(RunCondition = exports.RunCondition || (exports.RunCondition = {})); +var PackageRequirement; +(function (PackageRequirement) { + PackageRequirement["LetOctopusDecide"] = "LetOctopusDecide"; + PackageRequirement["BeforePackageAcquisition"] = "BeforePackageAcquisition"; + PackageRequirement["AfterPackageAcquisition"] = "AfterPackageAcquisition"; +})(PackageRequirement = exports.PackageRequirement || (exports.PackageRequirement = {})); /***/ }), @@ -4705,36 +4711,36 @@ var PackageRequirement; /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(7974), exports); -__exportStar(__nccwpck_require__(1067), exports); -__exportStar(__nccwpck_require__(4143), exports); -__exportStar(__nccwpck_require__(5187), exports); -__exportStar(__nccwpck_require__(9075), exports); -__exportStar(__nccwpck_require__(6989), exports); -__exportStar(__nccwpck_require__(929), exports); -__exportStar(__nccwpck_require__(6259), exports); -__exportStar(__nccwpck_require__(3958), exports); -__exportStar(__nccwpck_require__(6676), exports); -__exportStar(__nccwpck_require__(5188), exports); -__exportStar(__nccwpck_require__(7266), exports); -__exportStar(__nccwpck_require__(7708), exports); -__exportStar(__nccwpck_require__(6057), exports); + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(7974), exports); +__exportStar(__nccwpck_require__(1067), exports); +__exportStar(__nccwpck_require__(4143), exports); +__exportStar(__nccwpck_require__(5187), exports); +__exportStar(__nccwpck_require__(9075), exports); +__exportStar(__nccwpck_require__(6989), exports); +__exportStar(__nccwpck_require__(929), exports); +__exportStar(__nccwpck_require__(6259), exports); +__exportStar(__nccwpck_require__(3958), exports); +__exportStar(__nccwpck_require__(6676), exports); +__exportStar(__nccwpck_require__(5188), exports); +__exportStar(__nccwpck_require__(7266), exports); +__exportStar(__nccwpck_require__(7708), exports); +__exportStar(__nccwpck_require__(6057), exports); /***/ }), @@ -4743,15 +4749,15 @@ __exportStar(__nccwpck_require__(6057), exports); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PackageAcquisitionLocation = void 0; -var PackageAcquisitionLocation; -(function (PackageAcquisitionLocation) { - PackageAcquisitionLocation["Server"] = "Server"; - PackageAcquisitionLocation["ExecutionTarget"] = "ExecutionTarget"; - PackageAcquisitionLocation["NotAcquired"] = "NotAcquired"; -})(PackageAcquisitionLocation = exports.PackageAcquisitionLocation || (exports.PackageAcquisitionLocation = {})); + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PackageAcquisitionLocation = void 0; +var PackageAcquisitionLocation; +(function (PackageAcquisitionLocation) { + PackageAcquisitionLocation["Server"] = "Server"; + PackageAcquisitionLocation["ExecutionTarget"] = "ExecutionTarget"; + PackageAcquisitionLocation["NotAcquired"] = "NotAcquired"; +})(PackageAcquisitionLocation = exports.PackageAcquisitionLocation || (exports.PackageAcquisitionLocation = {})); /***/ }), @@ -4760,14 +4766,14 @@ var PackageAcquisitionLocation; /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PackageSelectionMode = void 0; -var PackageSelectionMode; -(function (PackageSelectionMode) { - PackageSelectionMode["Immediate"] = "immediate"; - PackageSelectionMode["Deferred"] = "deferred"; -})(PackageSelectionMode = exports.PackageSelectionMode || (exports.PackageSelectionMode = {})); + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PackageSelectionMode = void 0; +var PackageSelectionMode; +(function (PackageSelectionMode) { + PackageSelectionMode["Immediate"] = "immediate"; + PackageSelectionMode["Deferred"] = "deferred"; +})(PackageSelectionMode = exports.PackageSelectionMode || (exports.PackageSelectionMode = {})); /***/ }), @@ -4776,14 +4782,14 @@ var PackageSelectionMode; /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RunConditionForAction = void 0; -var RunConditionForAction; -(function (RunConditionForAction) { - RunConditionForAction["Success"] = "Success"; - RunConditionForAction["Variable"] = "Variable"; -})(RunConditionForAction = exports.RunConditionForAction || (exports.RunConditionForAction = {})); + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RunConditionForAction = void 0; +var RunConditionForAction; +(function (RunConditionForAction) { + RunConditionForAction["Success"] = "Success"; + RunConditionForAction["Variable"] = "Variable"; +})(RunConditionForAction = exports.RunConditionForAction || (exports.RunConditionForAction = {})); /***/ }), @@ -4792,8 +4798,8 @@ var RunConditionForAction; /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -4802,85 +4808,85 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(7274), exports); -__exportStar(__nccwpck_require__(3820), exports); -__exportStar(__nccwpck_require__(5068), exports); -__exportStar(__nccwpck_require__(7397), exports); -__exportStar(__nccwpck_require__(9259), exports); -__exportStar(__nccwpck_require__(7748), exports); -__exportStar(__nccwpck_require__(3041), exports); -__exportStar(__nccwpck_require__(5469), exports); - - -/***/ }), - -/***/ 7748: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* eslint-disable @typescript-eslint/no-explicit-any */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getBranchNameFromRouteParameter = exports.getURISafeBranchName = exports.isVcsBranchResource = exports.NewProject = exports.HasVersionControlledPersistenceSettings = exports.IsUsingUsernamePasswordAuth = exports.AuthenticationType = exports.PersistenceSettingsType = void 0; -var PersistenceSettingsType; -(function (PersistenceSettingsType) { - PersistenceSettingsType["VersionControlled"] = "VersionControlled"; - PersistenceSettingsType["Database"] = "Database"; -})(PersistenceSettingsType = exports.PersistenceSettingsType || (exports.PersistenceSettingsType = {})); -var AuthenticationType; -(function (AuthenticationType) { - AuthenticationType["Anonymous"] = "Anonymous"; - AuthenticationType["UsernamePassword"] = "UsernamePassword"; -})(AuthenticationType = exports.AuthenticationType || (exports.AuthenticationType = {})); -function IsUsingUsernamePasswordAuth(T) { - // eslint-disable-next-line @typescript-eslint/consistent-type-assertions - return T.Type === AuthenticationType.UsernamePassword; -} -exports.IsUsingUsernamePasswordAuth = IsUsingUsernamePasswordAuth; -function HasVersionControlledPersistenceSettings(T) { - return T.Type === PersistenceSettingsType.VersionControlled; -} -exports.HasVersionControlledPersistenceSettings = HasVersionControlledPersistenceSettings; -function NewProject(name, projectGroup, lifecycle) { - return { - LifecycleId: lifecycle.Id, - Name: name, - ProjectGroupId: projectGroup.Id, - }; -} -exports.NewProject = NewProject; -function isVcsBranchResource(branch) { - // eslint-disable-next-line @typescript-eslint/consistent-type-assertions - return branch.Name !== undefined; -} -exports.isVcsBranchResource = isVcsBranchResource; -function getURISafeBranchName(branch) { - return encodeURIComponent(branch.Name); -} -exports.getURISafeBranchName = getURISafeBranchName; -function getBranchNameFromRouteParameter(routeParameter) { - if (routeParameter) { - return decodeURIComponent(routeParameter); - } - return undefined; -} -exports.getBranchNameFromRouteParameter = getBranchNameFromRouteParameter; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(7274), exports); +__exportStar(__nccwpck_require__(3820), exports); +__exportStar(__nccwpck_require__(5068), exports); +__exportStar(__nccwpck_require__(7397), exports); +__exportStar(__nccwpck_require__(9259), exports); +__exportStar(__nccwpck_require__(7748), exports); +__exportStar(__nccwpck_require__(3041), exports); +__exportStar(__nccwpck_require__(5469), exports); + + +/***/ }), + +/***/ 7748: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/* eslint-disable @typescript-eslint/no-explicit-any */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getBranchNameFromRouteParameter = exports.getURISafeBranchName = exports.isVcsBranchResource = exports.NewProject = exports.HasVersionControlledPersistenceSettings = exports.IsUsingUsernamePasswordAuth = exports.AuthenticationType = exports.PersistenceSettingsType = void 0; +var PersistenceSettingsType; +(function (PersistenceSettingsType) { + PersistenceSettingsType["VersionControlled"] = "VersionControlled"; + PersistenceSettingsType["Database"] = "Database"; +})(PersistenceSettingsType = exports.PersistenceSettingsType || (exports.PersistenceSettingsType = {})); +var AuthenticationType; +(function (AuthenticationType) { + AuthenticationType["Anonymous"] = "Anonymous"; + AuthenticationType["UsernamePassword"] = "UsernamePassword"; +})(AuthenticationType = exports.AuthenticationType || (exports.AuthenticationType = {})); +function IsUsingUsernamePasswordAuth(T) { + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions + return T.Type === AuthenticationType.UsernamePassword; +} +exports.IsUsingUsernamePasswordAuth = IsUsingUsernamePasswordAuth; +function HasVersionControlledPersistenceSettings(T) { + return T.Type === PersistenceSettingsType.VersionControlled; +} +exports.HasVersionControlledPersistenceSettings = HasVersionControlledPersistenceSettings; +function NewProject(name, projectGroup, lifecycle) { + return { + LifecycleId: lifecycle.Id, + Name: name, + ProjectGroupId: projectGroup.Id, + }; +} +exports.NewProject = NewProject; +function isVcsBranchResource(branch) { + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions + return branch.Name !== undefined; +} +exports.isVcsBranchResource = isVcsBranchResource; +function getURISafeBranchName(branch) { + return encodeURIComponent(branch.Name); +} +exports.getURISafeBranchName = getURISafeBranchName; +function getBranchNameFromRouteParameter(routeParameter) { + if (routeParameter) { + return decodeURIComponent(routeParameter); + } + return undefined; +} +exports.getBranchNameFromRouteParameter = getBranchNameFromRouteParameter; /***/ }), @@ -4889,34 +4895,34 @@ exports.getBranchNameFromRouteParameter = getBranchNameFromRouteParameter; /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ProjectRepository = void 0; -var spaceScopedBasicRepository_1 = __nccwpck_require__(3496); -var __1 = __nccwpck_require__(586); -var ProjectRepository = /** @class */ (function (_super) { - __extends(ProjectRepository, _super); - function ProjectRepository(client, spaceName) { - return _super.call(this, client, spaceName, "".concat(__1.spaceScopedRoutePrefix, "/projects"), "skip,take,ids,partialName,clonedFromProjectId") || this; - } - return ProjectRepository; -}(spaceScopedBasicRepository_1.SpaceScopedBasicRepository)); -exports.ProjectRepository = ProjectRepository; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ProjectRepository = void 0; +var spaceScopedBasicRepository_1 = __nccwpck_require__(3496); +var __1 = __nccwpck_require__(586); +var ProjectRepository = /** @class */ (function (_super) { + __extends(ProjectRepository, _super); + function ProjectRepository(client, spaceName) { + return _super.call(this, client, spaceName, "".concat(__1.spaceScopedRoutePrefix, "/projects"), "skip,take,ids,partialName,clonedFromProjectId") || this; + } + return ProjectRepository; +}(spaceScopedBasicRepository_1.SpaceScopedBasicRepository)); +exports.ProjectRepository = ProjectRepository; /***/ }), @@ -4925,8 +4931,8 @@ exports.ProjectRepository = ProjectRepository; /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -4935,8 +4941,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -4945,8 +4951,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -4955,8 +4961,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -4965,8 +4971,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -4975,126 +4981,126 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -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()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DeploymentRepository = void 0; -var __1 = __nccwpck_require__(586); -var DeploymentRepository = /** @class */ (function () { - function DeploymentRepository(client, spaceName) { - this.baseApiPathTemplate = "".concat(__1.spaceScopedRoutePrefix, "/deployments"); - this.client = client; - this.spaceName = spaceName; - } - DeploymentRepository.prototype.get = function (id) { - return this.client.request("".concat(this.baseApiPathTemplate, "/").concat(id), { spaceName: this.spaceName }); - }; - DeploymentRepository.prototype.list = function (args) { - return this.client.request("".concat(this.baseApiPathTemplate, "{?skip,take,ids,projects,environments,tenants,channels,taskState}"), __assign({ spaceName: this.spaceName }, args)); - }; - DeploymentRepository.prototype.create = function (command) { - return __awaiter(this, void 0, void 0, function () { - var response, mappedTasks; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - this.client.debug("Deploying a release..."); - return [4 /*yield*/, this.client.doCreate("".concat(this.baseApiPathTemplate, "/create/untenanted/v1"), __assign({ spaceIdOrName: command.spaceName }, command))]; - case 1: - response = _a.sent(); - if (response.DeploymentServerTasks.length == 0) { - throw new Error("No server task details returned"); - } - mappedTasks = response.DeploymentServerTasks.map(function (x) { - return { - DeploymentId: x.DeploymentId || x.deploymentId, - ServerTaskId: x.ServerTaskId || x.serverTaskId, - }; - }); - this.client.debug("Deployment(s) created successfully. [".concat(mappedTasks.map(function (t) { return t.ServerTaskId; }).join(", "), "]")); - return [2 /*return*/, { - DeploymentServerTasks: mappedTasks, - }]; - } - }); - }); - }; - DeploymentRepository.prototype.createTenanted = function (command) { - return __awaiter(this, void 0, void 0, function () { - var response, mappedTasks; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - this.client.debug("Deploying a tenanted release..."); - return [4 /*yield*/, this.client.doCreate("".concat(this.baseApiPathTemplate, "/create/tenanted/v1"), __assign({ spaceIdOrName: command.spaceName }, command))]; - case 1: - response = _a.sent(); - if (response.DeploymentServerTasks.length == 0) { - throw new Error("No server task details returned"); - } - mappedTasks = response.DeploymentServerTasks.map(function (x) { - return { - DeploymentId: x.DeploymentId || x.deploymentId, - ServerTaskId: x.ServerTaskId || x.serverTaskId, - }; - }); - this.client.debug("Tenanted Deployment(s) created successfully. [".concat(mappedTasks.map(function (t) { return t.ServerTaskId; }).join(", "), "]")); - return [2 /*return*/, { - DeploymentServerTasks: mappedTasks, - }]; - } - }); - }); - }; - return DeploymentRepository; -}()); -exports.DeploymentRepository = DeploymentRepository; + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +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()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeploymentRepository = void 0; +var __1 = __nccwpck_require__(586); +var DeploymentRepository = /** @class */ (function () { + function DeploymentRepository(client, spaceName) { + this.baseApiPathTemplate = "".concat(__1.spaceScopedRoutePrefix, "/deployments"); + this.client = client; + this.spaceName = spaceName; + } + DeploymentRepository.prototype.get = function (id) { + return this.client.request("".concat(this.baseApiPathTemplate, "/").concat(id), { spaceName: this.spaceName }); + }; + DeploymentRepository.prototype.list = function (args) { + return this.client.request("".concat(this.baseApiPathTemplate, "{?skip,take,ids,projects,environments,tenants,channels,taskState}"), __assign({ spaceName: this.spaceName }, args)); + }; + DeploymentRepository.prototype.create = function (command) { + return __awaiter(this, void 0, void 0, function () { + var response, mappedTasks; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this.client.debug("Deploying a release..."); + return [4 /*yield*/, this.client.doCreate("".concat(this.baseApiPathTemplate, "/create/untenanted/v1"), __assign({ spaceIdOrName: command.spaceName }, command))]; + case 1: + response = _a.sent(); + if (response.DeploymentServerTasks.length == 0) { + throw new Error("No server task details returned"); + } + mappedTasks = response.DeploymentServerTasks.map(function (x) { + return { + DeploymentId: x.DeploymentId || x.deploymentId, + ServerTaskId: x.ServerTaskId || x.serverTaskId, + }; + }); + this.client.debug("Deployment(s) created successfully. [".concat(mappedTasks.map(function (t) { return t.ServerTaskId; }).join(", "), "]")); + return [2 /*return*/, { + DeploymentServerTasks: mappedTasks, + }]; + } + }); + }); + }; + DeploymentRepository.prototype.createTenanted = function (command) { + return __awaiter(this, void 0, void 0, function () { + var response, mappedTasks; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this.client.debug("Deploying a tenanted release..."); + return [4 /*yield*/, this.client.doCreate("".concat(this.baseApiPathTemplate, "/create/tenanted/v1"), __assign({ spaceIdOrName: command.spaceName }, command))]; + case 1: + response = _a.sent(); + if (response.DeploymentServerTasks.length == 0) { + throw new Error("No server task details returned"); + } + mappedTasks = response.DeploymentServerTasks.map(function (x) { + return { + DeploymentId: x.DeploymentId || x.deploymentId, + ServerTaskId: x.ServerTaskId || x.serverTaskId, + }; + }); + this.client.debug("Tenanted Deployment(s) created successfully. [".concat(mappedTasks.map(function (t) { return t.ServerTaskId; }).join(", "), "]")); + return [2 /*return*/, { + DeploymentServerTasks: mappedTasks, + }]; + } + }); + }); + }; + return DeploymentRepository; +}()); +exports.DeploymentRepository = DeploymentRepository; /***/ }), @@ -5103,8 +5109,8 @@ exports.DeploymentRepository = DeploymentRepository; /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -5113,27 +5119,27 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(7), exports); -__exportStar(__nccwpck_require__(3565), exports); -__exportStar(__nccwpck_require__(9198), exports); -__exportStar(__nccwpck_require__(3227), exports); -__exportStar(__nccwpck_require__(5952), exports); + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(7), exports); +__exportStar(__nccwpck_require__(3565), exports); +__exportStar(__nccwpck_require__(9198), exports); +__exportStar(__nccwpck_require__(3227), exports); +__exportStar(__nccwpck_require__(5952), exports); /***/ }), @@ -5142,27 +5148,27 @@ __exportStar(__nccwpck_require__(5952), exports); /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(3921), exports); -__exportStar(__nccwpck_require__(7650), exports); -__exportStar(__nccwpck_require__(4213), exports); -__exportStar(__nccwpck_require__(7448), exports); -__exportStar(__nccwpck_require__(8566), exports); + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(3921), exports); +__exportStar(__nccwpck_require__(7650), exports); +__exportStar(__nccwpck_require__(4213), exports); +__exportStar(__nccwpck_require__(7448), exports); +__exportStar(__nccwpck_require__(8566), exports); /***/ }), @@ -5171,8 +5177,8 @@ __exportStar(__nccwpck_require__(8566), exports); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -5181,81 +5187,81 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -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()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ReleaseRepository = void 0; -var __1 = __nccwpck_require__(586); -var ReleaseRepository = /** @class */ (function () { - function ReleaseRepository(client, spaceName) { - this.client = client; - this.spaceName = spaceName; - } - ReleaseRepository.prototype.create = function (command) { - return __awaiter(this, void 0, void 0, function () { - var response; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - this.client.debug("Creating a release..."); - return [4 /*yield*/, this.client.doCreate("".concat(__1.spaceScopedRoutePrefix, "/releases/create/v1"), __assign({ spaceIdOrName: command.spaceName }, command))]; - case 1: - response = _a.sent(); - this.client.debug("Release created successfully."); - return [2 /*return*/, response]; - } - }); - }); - }; - return ReleaseRepository; -}()); -exports.ReleaseRepository = ReleaseRepository; + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +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()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ReleaseRepository = void 0; +var __1 = __nccwpck_require__(586); +var ReleaseRepository = /** @class */ (function () { + function ReleaseRepository(client, spaceName) { + this.client = client; + this.spaceName = spaceName; + } + ReleaseRepository.prototype.create = function (command) { + return __awaiter(this, void 0, void 0, function () { + var response; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this.client.debug("Creating a release..."); + return [4 /*yield*/, this.client.doCreate("".concat(__1.spaceScopedRoutePrefix, "/releases/create/v1"), __assign({ spaceIdOrName: command.spaceName }, command))]; + case 1: + response = _a.sent(); + this.client.debug("Release created successfully."); + return [2 /*return*/, response]; + } + }); + }); + }; + return ReleaseRepository; +}()); +exports.ReleaseRepository = ReleaseRepository; /***/ }), @@ -5264,31 +5270,31 @@ exports.ReleaseRepository = ReleaseRepository; /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(7890), exports); -__exportStar(__nccwpck_require__(9664), exports); -__exportStar(__nccwpck_require__(9825), exports); -__exportStar(__nccwpck_require__(1379), exports); -__exportStar(__nccwpck_require__(4916), exports); -__exportStar(__nccwpck_require__(8920), exports); -__exportStar(__nccwpck_require__(3196), exports); -__exportStar(__nccwpck_require__(2938), exports); -__exportStar(__nccwpck_require__(7068), exports); + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(7890), exports); +__exportStar(__nccwpck_require__(9664), exports); +__exportStar(__nccwpck_require__(9825), exports); +__exportStar(__nccwpck_require__(1379), exports); +__exportStar(__nccwpck_require__(4916), exports); +__exportStar(__nccwpck_require__(8920), exports); +__exportStar(__nccwpck_require__(3196), exports); +__exportStar(__nccwpck_require__(2938), exports); +__exportStar(__nccwpck_require__(7068), exports); /***/ }), @@ -5297,8 +5303,8 @@ __exportStar(__nccwpck_require__(7068), exports); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -5307,15 +5313,15 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RunbookEnvironmentScope = void 0; -var RunbookEnvironmentScope; -(function (RunbookEnvironmentScope) { - RunbookEnvironmentScope["All"] = "All"; - RunbookEnvironmentScope["Specified"] = "Specified"; - RunbookEnvironmentScope["FromProjectLifecycles"] = "FromProjectLifecycles"; -})(RunbookEnvironmentScope = exports.RunbookEnvironmentScope || (exports.RunbookEnvironmentScope = {})); + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RunbookEnvironmentScope = void 0; +var RunbookEnvironmentScope; +(function (RunbookEnvironmentScope) { + RunbookEnvironmentScope["All"] = "All"; + RunbookEnvironmentScope["Specified"] = "Specified"; + RunbookEnvironmentScope["FromProjectLifecycles"] = "FromProjectLifecycles"; +})(RunbookEnvironmentScope = exports.RunbookEnvironmentScope || (exports.RunbookEnvironmentScope = {})); /***/ }), @@ -5324,25 +5330,25 @@ var RunbookEnvironmentScope; /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.processResourcePermission = exports.isRunbookProcess = void 0; -var utils_1 = __nccwpck_require__(7132); -var permission_1 = __nccwpck_require__(800); -function isRunbookProcess(resource) { - if (resource === null || resource === undefined) { - return false; - } - // eslint-disable-next-line @typescript-eslint/consistent-type-assertions - var converted = resource; - return converted.RunbookId !== undefined && (0, utils_1.typeSafeHasOwnProperty)(converted, "RunbookId"); -} -exports.isRunbookProcess = isRunbookProcess; -function processResourcePermission(resource) { - var isRunbook = isRunbookProcess(resource); - return isRunbook ? permission_1.Permission.RunbookEdit : permission_1.Permission.ProcessEdit; -} -exports.processResourcePermission = processResourcePermission; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.processResourcePermission = exports.isRunbookProcess = void 0; +var utils_1 = __nccwpck_require__(7132); +var permission_1 = __nccwpck_require__(800); +function isRunbookProcess(resource) { + if (resource === null || resource === undefined) { + return false; + } + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions + var converted = resource; + return converted.RunbookId !== undefined && (0, utils_1.typeSafeHasOwnProperty)(converted, "RunbookId"); +} +exports.isRunbookProcess = isRunbookProcess; +function processResourcePermission(resource) { + var isRunbook = isRunbookProcess(resource); + return isRunbook ? permission_1.Permission.RunbookEdit : permission_1.Permission.ProcessEdit; +} +exports.processResourcePermission = processResourcePermission; /***/ }), @@ -5351,89 +5357,89 @@ exports.processResourcePermission = processResourcePermission; /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "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()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RunbookProcessRepository = void 0; -var spaceScopedRoutePrefix_1 = __nccwpck_require__(7218); -var RunbookProcessRepository = /** @class */ (function () { - function RunbookProcessRepository(client, spaceName, project) { - this.client = client; - this.spaceName = spaceName; - this.projectId = project.Id; - } - RunbookProcessRepository.prototype.get = function (runbook) { - return __awaiter(this, void 0, void 0, function () { - var response; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.client.request("".concat(spaceScopedRoutePrefix_1.spaceScopedRoutePrefix, "/projects/{projectId}/runbookProcesses{/id}"), { - spaceName: this.spaceName, - projectId: this.projectId, - id: runbook.RunbookProcessId, - })]; - case 1: - response = _a.sent(); - return [2 /*return*/, response]; - } - }); - }); - }; - RunbookProcessRepository.prototype.update = function (runbookProcess) { - return __awaiter(this, void 0, void 0, function () { - var response; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.client.doUpdate("".concat(spaceScopedRoutePrefix_1.spaceScopedRoutePrefix, "/projects/{projectId}/runbookProcesses{/id}"), runbookProcess, { - spaceName: this.spaceName, - projectId: this.projectId, - id: runbookProcess.Id, - })]; - case 1: - response = _a.sent(); - return [2 /*return*/, response]; - } - }); - }); - }; - return RunbookProcessRepository; -}()); -exports.RunbookProcessRepository = RunbookProcessRepository; + +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()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RunbookProcessRepository = void 0; +var spaceScopedRoutePrefix_1 = __nccwpck_require__(7218); +var RunbookProcessRepository = /** @class */ (function () { + function RunbookProcessRepository(client, spaceName, project) { + this.client = client; + this.spaceName = spaceName; + this.projectId = project.Id; + } + RunbookProcessRepository.prototype.get = function (runbook) { + return __awaiter(this, void 0, void 0, function () { + var response; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.client.request("".concat(spaceScopedRoutePrefix_1.spaceScopedRoutePrefix, "/projects/{projectId}/runbookProcesses{/id}"), { + spaceName: this.spaceName, + projectId: this.projectId, + id: runbook.RunbookProcessId, + })]; + case 1: + response = _a.sent(); + return [2 /*return*/, response]; + } + }); + }); + }; + RunbookProcessRepository.prototype.update = function (runbookProcess) { + return __awaiter(this, void 0, void 0, function () { + var response; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.client.doUpdate("".concat(spaceScopedRoutePrefix_1.spaceScopedRoutePrefix, "/projects/{projectId}/runbookProcesses{/id}"), runbookProcess, { + spaceName: this.spaceName, + projectId: this.projectId, + id: runbookProcess.Id, + })]; + case 1: + response = _a.sent(); + return [2 /*return*/, response]; + } + }); + }); + }; + return RunbookProcessRepository; +}()); +exports.RunbookProcessRepository = RunbookProcessRepository; /***/ }), @@ -5442,34 +5448,34 @@ exports.RunbookProcessRepository = RunbookProcessRepository; /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RunbookRepository = void 0; -var spaceScopedRoutePrefix_1 = __nccwpck_require__(7218); -var spaceScopedBasicRepository_1 = __nccwpck_require__(3496); -var RunbookRepository = /** @class */ (function (_super) { - __extends(RunbookRepository, _super); - function RunbookRepository(client, spaceName, project) { - return _super.call(this, client, spaceName, "".concat(spaceScopedRoutePrefix_1.spaceScopedRoutePrefix, "/projects/").concat(project.Id, "/runbooks"), "skip,take,ids,partialName") || this; - } - return RunbookRepository; -}(spaceScopedBasicRepository_1.SpaceScopedBasicRepository)); -exports.RunbookRepository = RunbookRepository; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RunbookRepository = void 0; +var spaceScopedRoutePrefix_1 = __nccwpck_require__(7218); +var spaceScopedBasicRepository_1 = __nccwpck_require__(3496); +var RunbookRepository = /** @class */ (function (_super) { + __extends(RunbookRepository, _super); + function RunbookRepository(client, spaceName, project) { + return _super.call(this, client, spaceName, "".concat(spaceScopedRoutePrefix_1.spaceScopedRoutePrefix, "/projects/").concat(project.Id, "/runbooks"), "skip,take,ids,partialName") || this; + } + return RunbookRepository; +}(spaceScopedBasicRepository_1.SpaceScopedBasicRepository)); +exports.RunbookRepository = RunbookRepository; /***/ }), @@ -5478,8 +5484,8 @@ exports.RunbookRepository = RunbookRepository; /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -5488,8 +5494,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -5498,79 +5504,79 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "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()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RunbookSnapshotRepository = void 0; -var spaceScopedRoutePrefix_1 = __nccwpck_require__(7218); -var RunbookSnapshotRepository = /** @class */ (function () { - function RunbookSnapshotRepository(client, spaceName, project) { - this.client = client; - this.spaceName = spaceName; - this.projectId = project.Id; - } - RunbookSnapshotRepository.prototype.create = function (runbook, name, publish, notes) { - return __awaiter(this, void 0, void 0, function () { - var snapshot, response; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - snapshot = { - ProjectId: this.projectId, - RunbookId: runbook.Id, - Name: name, - Notes: notes, - }; - return [4 /*yield*/, this.client.doCreate("".concat(spaceScopedRoutePrefix_1.spaceScopedRoutePrefix, "/projects/{projectId}/runbookSnapshots{?publish}"), snapshot, { - spaceName: this.spaceName, - projectId: this.projectId, - publish: publish ? "true" : undefined, - })]; - case 1: - response = _a.sent(); - return [2 /*return*/, response]; - } - }); - }); - }; - return RunbookSnapshotRepository; -}()); -exports.RunbookSnapshotRepository = RunbookSnapshotRepository; + +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()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RunbookSnapshotRepository = void 0; +var spaceScopedRoutePrefix_1 = __nccwpck_require__(7218); +var RunbookSnapshotRepository = /** @class */ (function () { + function RunbookSnapshotRepository(client, spaceName, project) { + this.client = client; + this.spaceName = spaceName; + this.projectId = project.Id; + } + RunbookSnapshotRepository.prototype.create = function (runbook, name, publish, notes) { + return __awaiter(this, void 0, void 0, function () { + var snapshot, response; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + snapshot = { + ProjectId: this.projectId, + RunbookId: runbook.Id, + Name: name, + Notes: notes, + }; + return [4 /*yield*/, this.client.doCreate("".concat(spaceScopedRoutePrefix_1.spaceScopedRoutePrefix, "/projects/{projectId}/runbookSnapshots{?publish}"), snapshot, { + spaceName: this.spaceName, + projectId: this.projectId, + publish: publish ? "true" : undefined, + })]; + case 1: + response = _a.sent(); + return [2 /*return*/, response]; + } + }); + }); + }; + return RunbookSnapshotRepository; +}()); +exports.RunbookSnapshotRepository = RunbookSnapshotRepository; /***/ }), @@ -5579,8 +5585,8 @@ exports.RunbookSnapshotRepository = RunbookSnapshotRepository; /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -5589,26 +5595,26 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(4010), exports); -__exportStar(__nccwpck_require__(2562), exports); -__exportStar(__nccwpck_require__(827), exports); -__exportStar(__nccwpck_require__(2493), exports); + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(4010), exports); +__exportStar(__nccwpck_require__(2562), exports); +__exportStar(__nccwpck_require__(827), exports); +__exportStar(__nccwpck_require__(2493), exports); /***/ }), @@ -5617,8 +5623,8 @@ __exportStar(__nccwpck_require__(2493), exports); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -5627,99 +5633,99 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -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()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RunbookRunRepository = void 0; -var spaceScopedRoutePrefix_1 = __nccwpck_require__(7218); -var RunbookRunRepository = /** @class */ (function () { - function RunbookRunRepository(client, spaceName) { - this.baseApiPathTemplate = "".concat(spaceScopedRoutePrefix_1.spaceScopedRoutePrefix, "/runbookRuns"); - this.client = client; - this.spaceName = spaceName; - } - RunbookRunRepository.prototype.get = function (id) { - return this.client.request("".concat(this.baseApiPathTemplate, "/").concat(id), { spaceName: this.spaceName }); - }; - RunbookRunRepository.prototype.list = function (args) { - return this.client.request("".concat(this.baseApiPathTemplate, "{?skip,take,ids,projects,environments,tenants,runbooks,taskState,partialName}"), __assign({ spaceName: this.spaceName }, args)); - }; - RunbookRunRepository.prototype.create = function (command) { - return __awaiter(this, void 0, void 0, function () { - var response, mappedTasks; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - this.client.debug("Running a runbook..."); - return [4 /*yield*/, this.client.doCreate("".concat(spaceScopedRoutePrefix_1.spaceScopedRoutePrefix, "/runbook-runs/create/v1"), __assign({ spaceIdOrName: command.spaceName }, command))]; - case 1: - response = _a.sent(); - if (response.RunbookRunServerTasks.length == 0) { - throw new Error("No server task details returned"); - } - mappedTasks = response.RunbookRunServerTasks.map(function (x) { - return { - RunbookRunId: x.RunbookRunId || x.runbookRunId, - ServerTaskId: x.ServerTaskId || x.serverTaskId, - }; - }); - this.client.debug("Runbook executed successfully. [".concat(mappedTasks.map(function (t) { return t.ServerTaskId; }).join(", "), "]")); - return [2 /*return*/, { - RunbookRunServerTasks: mappedTasks, - }]; - } - }); - }); - }; - return RunbookRunRepository; -}()); -exports.RunbookRunRepository = RunbookRunRepository; + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +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()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RunbookRunRepository = void 0; +var spaceScopedRoutePrefix_1 = __nccwpck_require__(7218); +var RunbookRunRepository = /** @class */ (function () { + function RunbookRunRepository(client, spaceName) { + this.baseApiPathTemplate = "".concat(spaceScopedRoutePrefix_1.spaceScopedRoutePrefix, "/runbookRuns"); + this.client = client; + this.spaceName = spaceName; + } + RunbookRunRepository.prototype.get = function (id) { + return this.client.request("".concat(this.baseApiPathTemplate, "/").concat(id), { spaceName: this.spaceName }); + }; + RunbookRunRepository.prototype.list = function (args) { + return this.client.request("".concat(this.baseApiPathTemplate, "{?skip,take,ids,projects,environments,tenants,runbooks,taskState,partialName}"), __assign({ spaceName: this.spaceName }, args)); + }; + RunbookRunRepository.prototype.create = function (command) { + return __awaiter(this, void 0, void 0, function () { + var response, mappedTasks; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this.client.debug("Running a runbook..."); + return [4 /*yield*/, this.client.doCreate("".concat(spaceScopedRoutePrefix_1.spaceScopedRoutePrefix, "/runbook-runs/create/v1"), __assign({ spaceIdOrName: command.spaceName }, command))]; + case 1: + response = _a.sent(); + if (response.RunbookRunServerTasks.length == 0) { + throw new Error("No server task details returned"); + } + mappedTasks = response.RunbookRunServerTasks.map(function (x) { + return { + RunbookRunId: x.RunbookRunId || x.runbookRunId, + ServerTaskId: x.ServerTaskId || x.serverTaskId, + }; + }); + this.client.debug("Runbook executed successfully. [".concat(mappedTasks.map(function (t) { return t.ServerTaskId; }).join(", "), "]")); + return [2 /*return*/, { + RunbookRunServerTasks: mappedTasks, + }]; + } + }); + }); + }; + return RunbookRunRepository; +}()); +exports.RunbookRunRepository = RunbookRunRepository; /***/ }), @@ -5728,8 +5734,8 @@ exports.RunbookRunRepository = RunbookRunRepository; /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -5738,15 +5744,15 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TenantedDeploymentMode = void 0; -var TenantedDeploymentMode; -(function (TenantedDeploymentMode) { - TenantedDeploymentMode["Untenanted"] = "Untenanted"; - TenantedDeploymentMode["TenantedOrUntenanted"] = "TenantedOrUntenanted"; - TenantedDeploymentMode["Tenanted"] = "Tenanted"; -})(TenantedDeploymentMode = exports.TenantedDeploymentMode || (exports.TenantedDeploymentMode = {})); + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TenantedDeploymentMode = void 0; +var TenantedDeploymentMode; +(function (TenantedDeploymentMode) { + TenantedDeploymentMode["Untenanted"] = "Untenanted"; + TenantedDeploymentMode["TenantedOrUntenanted"] = "TenantedOrUntenanted"; + TenantedDeploymentMode["Tenanted"] = "Tenanted"; +})(TenantedDeploymentMode = exports.TenantedDeploymentMode || (exports.TenantedDeploymentMode = {})); /***/ }), @@ -5755,27 +5761,27 @@ var TenantedDeploymentMode; /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(4013), exports); -__exportStar(__nccwpck_require__(1038), exports); -__exportStar(__nccwpck_require__(1613), exports); -__exportStar(__nccwpck_require__(3797), exports); -__exportStar(__nccwpck_require__(9144), exports); + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(4013), exports); +__exportStar(__nccwpck_require__(1038), exports); +__exportStar(__nccwpck_require__(1613), exports); +__exportStar(__nccwpck_require__(3797), exports); +__exportStar(__nccwpck_require__(9144), exports); /***/ }), @@ -5784,8 +5790,8 @@ __exportStar(__nccwpck_require__(9144), exports); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -5794,36 +5800,36 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ActivityLogEntryCategory = exports.ActivityStatus = void 0; -var ActivityStatus; -(function (ActivityStatus) { - ActivityStatus["Pending"] = "Pending"; - ActivityStatus["Running"] = "Running"; - ActivityStatus["Success"] = "Success"; - ActivityStatus["Failed"] = "Failed"; - ActivityStatus["Skipped"] = "Skipped"; - ActivityStatus["SuccessWithWarning"] = "SuccessWithWarning"; - ActivityStatus["Canceled"] = "Canceled"; -})(ActivityStatus = exports.ActivityStatus || (exports.ActivityStatus = {})); -var ActivityLogEntryCategory; -(function (ActivityLogEntryCategory) { - ActivityLogEntryCategory["Trace"] = "Trace"; - ActivityLogEntryCategory["Verbose"] = "Verbose"; - ActivityLogEntryCategory["Info"] = "Info"; - ActivityLogEntryCategory["Highlight"] = "Highlight"; - ActivityLogEntryCategory["Wait"] = "Wait"; - ActivityLogEntryCategory["Gap"] = "Gap"; - ActivityLogEntryCategory["Alert"] = "Alert"; - ActivityLogEntryCategory["Warning"] = "Warning"; - ActivityLogEntryCategory["Error"] = "Error"; - ActivityLogEntryCategory["Fatal"] = "Fatal"; - ActivityLogEntryCategory["Planned"] = "Planned"; - ActivityLogEntryCategory["Updated"] = "Updated"; - ActivityLogEntryCategory["Finished"] = "Finished"; - ActivityLogEntryCategory["Abandoned"] = "Abandoned"; -})(ActivityLogEntryCategory = exports.ActivityLogEntryCategory || (exports.ActivityLogEntryCategory = {})); + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ActivityLogEntryCategory = exports.ActivityStatus = void 0; +var ActivityStatus; +(function (ActivityStatus) { + ActivityStatus["Pending"] = "Pending"; + ActivityStatus["Running"] = "Running"; + ActivityStatus["Success"] = "Success"; + ActivityStatus["Failed"] = "Failed"; + ActivityStatus["Skipped"] = "Skipped"; + ActivityStatus["SuccessWithWarning"] = "SuccessWithWarning"; + ActivityStatus["Canceled"] = "Canceled"; +})(ActivityStatus = exports.ActivityStatus || (exports.ActivityStatus = {})); +var ActivityLogEntryCategory; +(function (ActivityLogEntryCategory) { + ActivityLogEntryCategory["Trace"] = "Trace"; + ActivityLogEntryCategory["Verbose"] = "Verbose"; + ActivityLogEntryCategory["Info"] = "Info"; + ActivityLogEntryCategory["Highlight"] = "Highlight"; + ActivityLogEntryCategory["Wait"] = "Wait"; + ActivityLogEntryCategory["Gap"] = "Gap"; + ActivityLogEntryCategory["Alert"] = "Alert"; + ActivityLogEntryCategory["Warning"] = "Warning"; + ActivityLogEntryCategory["Error"] = "Error"; + ActivityLogEntryCategory["Fatal"] = "Fatal"; + ActivityLogEntryCategory["Planned"] = "Planned"; + ActivityLogEntryCategory["Updated"] = "Updated"; + ActivityLogEntryCategory["Finished"] = "Finished"; + ActivityLogEntryCategory["Abandoned"] = "Abandoned"; +})(ActivityLogEntryCategory = exports.ActivityLogEntryCategory || (exports.ActivityLogEntryCategory = {})); /***/ }), @@ -5831,320 +5837,320 @@ var ActivityLogEntryCategory; /***/ 1613: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { -"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()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ServerTaskWaiter = void 0; -var serverTasks_1 = __nccwpck_require__(6568); -var ServerTaskWaiter = /** @class */ (function () { - function ServerTaskWaiter(client, spaceName) { - this.client = client; - this.spaceName = spaceName; - } - ServerTaskWaiter.prototype.waitForServerTasksToComplete = function (serverTaskIds, statusCheckSleepCycle, timeout, pollingCallback) { - return __awaiter(this, void 0, void 0, function () { - var spaceServerTaskRepository, taskPromises, serverTaskIds_1, serverTaskIds_1_1, serverTaskId; - var e_1, _a; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - spaceServerTaskRepository = new serverTasks_1.SpaceServerTaskRepository(this.client, this.spaceName); - taskPromises = []; - try { - for (serverTaskIds_1 = __values(serverTaskIds), serverTaskIds_1_1 = serverTaskIds_1.next(); !serverTaskIds_1_1.done; serverTaskIds_1_1 = serverTaskIds_1.next()) { - serverTaskId = serverTaskIds_1_1.value; - taskPromises.push(this.waitForTask(spaceServerTaskRepository, serverTaskId, statusCheckSleepCycle, timeout, pollingCallback)); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (serverTaskIds_1_1 && !serverTaskIds_1_1.done && (_a = serverTaskIds_1.return)) _a.call(serverTaskIds_1); - } - finally { if (e_1) throw e_1.error; } - } - return [4 /*yield*/, Promise.allSettled(taskPromises)]; - case 1: return [2 /*return*/, _b.sent()]; - } - }); - }); - }; - ServerTaskWaiter.prototype.waitForServerTaskToComplete = function (serverTaskId, statusCheckSleepCycle, timeout, pollingCallback) { - return __awaiter(this, void 0, void 0, function () { - var spaceServerTaskRepository; - return __generator(this, function (_a) { - spaceServerTaskRepository = new serverTasks_1.SpaceServerTaskRepository(this.client, this.spaceName); - return [2 /*return*/, this.waitForTask(spaceServerTaskRepository, serverTaskId, statusCheckSleepCycle, timeout, pollingCallback)]; - }); - }); - }; - ServerTaskWaiter.prototype.waitForTask = function (spaceServerTaskRepository, serverTaskId, statusCheckSleepCycle, timeout, pollingCallback) { - return __awaiter(this, void 0, void 0, function () { - var sleep, stop, t, taskDetails, task; - var _this = this; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - sleep = function (ms) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) { - return [2 /*return*/, new Promise(function (r) { return setTimeout(r, ms); })]; - }); }); }; - stop = false; - t = setTimeout(function () { - stop = true; - }, timeout); - _a.label = 1; - case 1: - if (!!stop) return [3 /*break*/, 10]; - _a.label = 2; - case 2: - _a.trys.push([2, , 7, 8]); - if (!pollingCallback) return [3 /*break*/, 4]; - return [4 /*yield*/, spaceServerTaskRepository.getDetails(serverTaskId)]; - case 3: - taskDetails = _a.sent(); - pollingCallback(taskDetails); - if (taskDetails.Task.IsCompleted) { - return [2 /*return*/, taskDetails.Task]; - } - return [3 /*break*/, 6]; - case 4: return [4 /*yield*/, spaceServerTaskRepository.getById(serverTaskId)]; - case 5: - task = _a.sent(); - if (task.IsCompleted) { - return [2 /*return*/, task]; - } - _a.label = 6; - case 6: return [3 /*break*/, 8]; - case 7: - clearTimeout(t); - return [7 /*endfinally*/]; - case 8: return [4 /*yield*/, sleep(statusCheckSleepCycle)]; - case 9: - _a.sent(); - return [3 /*break*/, 1]; - case 10: return [2 /*return*/, null]; - } - }); - }); - }; - return ServerTaskWaiter; -}()); -exports.ServerTaskWaiter = ServerTaskWaiter; - - -/***/ }), - -/***/ 3797: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"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()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SpaceServerTaskRepository = void 0; -var lodash_1 = __nccwpck_require__(250); -var spaceScopedRoutePrefix_1 = __nccwpck_require__(7218); -var SpaceServerTaskRepository = /** @class */ (function () { - function SpaceServerTaskRepository(client, spaceName) { - this.baseApiPathTemplate = "".concat(spaceScopedRoutePrefix_1.spaceScopedRoutePrefix, "/tasks"); - this.client = client; - this.spaceName = spaceName; - } - SpaceServerTaskRepository.prototype.getById = function (serverTaskId) { - return __awaiter(this, void 0, void 0, function () { - var response; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!serverTaskId) { - throw new Error("Server Task Id was not provided"); - } - return [4 /*yield*/, this.client.request("".concat(this.baseApiPathTemplate, "/").concat(serverTaskId), { spaceName: this.spaceName })]; - case 1: - response = _a.sent(); - return [2 /*return*/, response]; - } - }); - }); - }; - SpaceServerTaskRepository.prototype.getByIds = function (serverTaskIds) { - return __awaiter(this, void 0, void 0, function () { - var batchSize, idArrays, promises, _a, _b, _c, index, ids; - var e_1, _d; - return __generator(this, function (_e) { - batchSize = 300; - idArrays = (0, lodash_1.chunk)(serverTaskIds, batchSize); - promises = []; - try { - for (_a = __values(idArrays.entries()), _b = _a.next(); !_b.done; _b = _a.next()) { - _c = __read(_b.value, 2), index = _c[0], ids = _c[1]; - promises.push(this.client.request("".concat(this.baseApiPathTemplate, "{?skip,take,ids,partialName}"), { - spaceName: this.spaceName, - ids: ids, - skip: index * batchSize, - take: batchSize, - })); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_b && !_b.done && (_d = _a.return)) _d.call(_a); - } - finally { if (e_1) throw e_1.error; } - } - return [2 /*return*/, Promise.allSettled(promises).then(function (result) { return (0, lodash_1.flatMap)(result, function (c) { return (c.status == "fulfilled" ? c.value.Items : []); }); })]; - }); - }); - }; - SpaceServerTaskRepository.prototype.getDetails = function (serverTaskId) { - return __awaiter(this, void 0, void 0, function () { - var response; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!serverTaskId) { - throw new Error("Server Task Id was not provided"); - } - return [4 /*yield*/, this.client.request("".concat(this.baseApiPathTemplate, "/").concat(serverTaskId, "/details"), { - spaceName: this.spaceName, - })]; - case 1: - response = _a.sent(); - return [2 /*return*/, response]; - } - }); - }); - }; - SpaceServerTaskRepository.prototype.getRaw = function (serverTaskId) { - return __awaiter(this, void 0, void 0, function () { - var response; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!serverTaskId) { - throw new Error("Server Task Id was not provided"); - } - return [4 /*yield*/, this.client.request("".concat(this.baseApiPathTemplate, "/").concat(serverTaskId, "/raw"), { spaceName: this.spaceName })]; - case 1: - response = _a.sent(); - return [2 /*return*/, response]; - } - }); - }); - }; - return SpaceServerTaskRepository; -}()); -exports.SpaceServerTaskRepository = SpaceServerTaskRepository; +"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()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ServerTaskWaiter = void 0; +var serverTasks_1 = __nccwpck_require__(6568); +var ServerTaskWaiter = /** @class */ (function () { + function ServerTaskWaiter(client, spaceName) { + this.client = client; + this.spaceName = spaceName; + } + ServerTaskWaiter.prototype.waitForServerTasksToComplete = function (serverTaskIds, statusCheckSleepCycle, timeout, pollingCallback) { + return __awaiter(this, void 0, void 0, function () { + var spaceServerTaskRepository, taskPromises, serverTaskIds_1, serverTaskIds_1_1, serverTaskId; + var e_1, _a; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + spaceServerTaskRepository = new serverTasks_1.SpaceServerTaskRepository(this.client, this.spaceName); + taskPromises = []; + try { + for (serverTaskIds_1 = __values(serverTaskIds), serverTaskIds_1_1 = serverTaskIds_1.next(); !serverTaskIds_1_1.done; serverTaskIds_1_1 = serverTaskIds_1.next()) { + serverTaskId = serverTaskIds_1_1.value; + taskPromises.push(this.waitForTask(spaceServerTaskRepository, serverTaskId, statusCheckSleepCycle, timeout, pollingCallback)); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (serverTaskIds_1_1 && !serverTaskIds_1_1.done && (_a = serverTaskIds_1.return)) _a.call(serverTaskIds_1); + } + finally { if (e_1) throw e_1.error; } + } + return [4 /*yield*/, Promise.allSettled(taskPromises)]; + case 1: return [2 /*return*/, _b.sent()]; + } + }); + }); + }; + ServerTaskWaiter.prototype.waitForServerTaskToComplete = function (serverTaskId, statusCheckSleepCycle, timeout, pollingCallback) { + return __awaiter(this, void 0, void 0, function () { + var spaceServerTaskRepository; + return __generator(this, function (_a) { + spaceServerTaskRepository = new serverTasks_1.SpaceServerTaskRepository(this.client, this.spaceName); + return [2 /*return*/, this.waitForTask(spaceServerTaskRepository, serverTaskId, statusCheckSleepCycle, timeout, pollingCallback)]; + }); + }); + }; + ServerTaskWaiter.prototype.waitForTask = function (spaceServerTaskRepository, serverTaskId, statusCheckSleepCycle, timeout, pollingCallback) { + return __awaiter(this, void 0, void 0, function () { + var sleep, stop, t, taskDetails, task; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + sleep = function (ms) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) { + return [2 /*return*/, new Promise(function (r) { return setTimeout(r, ms); })]; + }); }); }; + stop = false; + t = setTimeout(function () { + stop = true; + }, timeout); + _a.label = 1; + case 1: + if (!!stop) return [3 /*break*/, 10]; + _a.label = 2; + case 2: + _a.trys.push([2, , 7, 8]); + if (!pollingCallback) return [3 /*break*/, 4]; + return [4 /*yield*/, spaceServerTaskRepository.getDetails(serverTaskId)]; + case 3: + taskDetails = _a.sent(); + pollingCallback(taskDetails); + if (taskDetails.Task.IsCompleted) { + return [2 /*return*/, taskDetails.Task]; + } + return [3 /*break*/, 6]; + case 4: return [4 /*yield*/, spaceServerTaskRepository.getById(serverTaskId)]; + case 5: + task = _a.sent(); + if (task.IsCompleted) { + return [2 /*return*/, task]; + } + _a.label = 6; + case 6: return [3 /*break*/, 8]; + case 7: + clearTimeout(t); + return [7 /*endfinally*/]; + case 8: return [4 /*yield*/, sleep(statusCheckSleepCycle)]; + case 9: + _a.sent(); + return [3 /*break*/, 1]; + case 10: return [2 /*return*/, null]; + } + }); + }); + }; + return ServerTaskWaiter; +}()); +exports.ServerTaskWaiter = ServerTaskWaiter; + + +/***/ }), + +/***/ 3797: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"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()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SpaceServerTaskRepository = void 0; +var lodash_1 = __nccwpck_require__(250); +var spaceScopedRoutePrefix_1 = __nccwpck_require__(7218); +var SpaceServerTaskRepository = /** @class */ (function () { + function SpaceServerTaskRepository(client, spaceName) { + this.baseApiPathTemplate = "".concat(spaceScopedRoutePrefix_1.spaceScopedRoutePrefix, "/tasks"); + this.client = client; + this.spaceName = spaceName; + } + SpaceServerTaskRepository.prototype.getById = function (serverTaskId) { + return __awaiter(this, void 0, void 0, function () { + var response; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!serverTaskId) { + throw new Error("Server Task Id was not provided"); + } + return [4 /*yield*/, this.client.request("".concat(this.baseApiPathTemplate, "/").concat(serverTaskId), { spaceName: this.spaceName })]; + case 1: + response = _a.sent(); + return [2 /*return*/, response]; + } + }); + }); + }; + SpaceServerTaskRepository.prototype.getByIds = function (serverTaskIds) { + return __awaiter(this, void 0, void 0, function () { + var batchSize, idArrays, promises, _a, _b, _c, index, ids; + var e_1, _d; + return __generator(this, function (_e) { + batchSize = 300; + idArrays = (0, lodash_1.chunk)(serverTaskIds, batchSize); + promises = []; + try { + for (_a = __values(idArrays.entries()), _b = _a.next(); !_b.done; _b = _a.next()) { + _c = __read(_b.value, 2), index = _c[0], ids = _c[1]; + promises.push(this.client.request("".concat(this.baseApiPathTemplate, "{?skip,take,ids,partialName}"), { + spaceName: this.spaceName, + ids: ids, + skip: index * batchSize, + take: batchSize, + })); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_b && !_b.done && (_d = _a.return)) _d.call(_a); + } + finally { if (e_1) throw e_1.error; } + } + return [2 /*return*/, Promise.allSettled(promises).then(function (result) { return (0, lodash_1.flatMap)(result, function (c) { return (c.status == "fulfilled" ? c.value.Items : []); }); })]; + }); + }); + }; + SpaceServerTaskRepository.prototype.getDetails = function (serverTaskId) { + return __awaiter(this, void 0, void 0, function () { + var response; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!serverTaskId) { + throw new Error("Server Task Id was not provided"); + } + return [4 /*yield*/, this.client.request("".concat(this.baseApiPathTemplate, "/").concat(serverTaskId, "/details"), { + spaceName: this.spaceName, + })]; + case 1: + response = _a.sent(); + return [2 /*return*/, response]; + } + }); + }); + }; + SpaceServerTaskRepository.prototype.getRaw = function (serverTaskId) { + return __awaiter(this, void 0, void 0, function () { + var response; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!serverTaskId) { + throw new Error("Server Task Id was not provided"); + } + return [4 /*yield*/, this.client.request("".concat(this.baseApiPathTemplate, "/").concat(serverTaskId, "/raw"), { spaceName: this.spaceName })]; + case 1: + response = _a.sent(); + return [2 /*return*/, response]; + } + }); + }); + }; + return SpaceServerTaskRepository; +}()); +exports.SpaceServerTaskRepository = SpaceServerTaskRepository; /***/ }), @@ -6153,19 +6159,19 @@ exports.SpaceServerTaskRepository = SpaceServerTaskRepository; /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TaskState = void 0; -var TaskState; -(function (TaskState) { - TaskState["Canceled"] = "Canceled"; - TaskState["Cancelling"] = "Cancelling"; - TaskState["Executing"] = "Executing"; - TaskState["Failed"] = "Failed"; - TaskState["Queued"] = "Queued"; - TaskState["Success"] = "Success"; - TaskState["TimedOut"] = "TimedOut"; -})(TaskState = exports.TaskState || (exports.TaskState = {})); + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TaskState = void 0; +var TaskState; +(function (TaskState) { + TaskState["Canceled"] = "Canceled"; + TaskState["Cancelling"] = "Cancelling"; + TaskState["Executing"] = "Executing"; + TaskState["Failed"] = "Failed"; + TaskState["Queued"] = "Queued"; + TaskState["Success"] = "Success"; + TaskState["TimedOut"] = "TimedOut"; +})(TaskState = exports.TaskState || (exports.TaskState = {})); /***/ }), @@ -6174,71 +6180,71 @@ var TaskState; /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SpaceScopedBasicRepository = void 0; -var basicRepository_1 = __nccwpck_require__(2966); -var spaceScopedRoutePrefix_1 = __nccwpck_require__(7218); -var SpaceScopedBasicRepository = /** @class */ (function (_super) { - __extends(SpaceScopedBasicRepository, _super); - function SpaceScopedBasicRepository(client, spaceName, baseApiPathTemplate, listParametersTemplate) { - var _this = _super.call(this, client, baseApiPathTemplate, listParametersTemplate) || this; - if (!baseApiPathTemplate.startsWith(spaceScopedRoutePrefix_1.spaceScopedRoutePrefix)) { - throw new Error("Space scoped repositories must prefix their baseApiTemplate with `spaceScopedRoutePrefix`"); - } - _this.spaceName = spaceName; - return _this; - } - SpaceScopedBasicRepository.prototype.del = function (resource) { - var _this = this; - return this.client - .del("".concat(this.baseApiPathTemplate, "/").concat(resource.Id), { spaceName: this.spaceName }) - .then(function (d) { return _this.notifySubscribersToDataModifications(resource); }); - }; - SpaceScopedBasicRepository.prototype.create = function (resource, args) { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - return _super.prototype.create.call(this, resource, __assign({ spaceName: this.spaceName }, args)); - }; - SpaceScopedBasicRepository.prototype.get = function (id) { - return this.client.request("".concat(this.baseApiPathTemplate, "/").concat(id), { spaceName: this.spaceName }); - }; - SpaceScopedBasicRepository.prototype.list = function (args) { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - return _super.prototype.list.call(this, __assign({ spaceName: this.spaceName }, args)); - }; - SpaceScopedBasicRepository.prototype.modify = function (resource, args) { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - return _super.prototype.modify.call(this, resource, __assign({ spaceName: this.spaceName }, args)); - }; - return SpaceScopedBasicRepository; -}(basicRepository_1.BasicRepository)); -exports.SpaceScopedBasicRepository = SpaceScopedBasicRepository; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SpaceScopedBasicRepository = void 0; +var basicRepository_1 = __nccwpck_require__(2966); +var spaceScopedRoutePrefix_1 = __nccwpck_require__(7218); +var SpaceScopedBasicRepository = /** @class */ (function (_super) { + __extends(SpaceScopedBasicRepository, _super); + function SpaceScopedBasicRepository(client, spaceName, baseApiPathTemplate, listParametersTemplate) { + var _this = _super.call(this, client, baseApiPathTemplate, listParametersTemplate) || this; + if (!baseApiPathTemplate.startsWith(spaceScopedRoutePrefix_1.spaceScopedRoutePrefix)) { + throw new Error("Space scoped repositories must prefix their baseApiTemplate with `spaceScopedRoutePrefix`"); + } + _this.spaceName = spaceName; + return _this; + } + SpaceScopedBasicRepository.prototype.del = function (resource) { + var _this = this; + return this.client + .del("".concat(this.baseApiPathTemplate, "/").concat(resource.Id), { spaceName: this.spaceName }) + .then(function (d) { return _this.notifySubscribersToDataModifications(resource); }); + }; + SpaceScopedBasicRepository.prototype.create = function (resource, args) { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + return _super.prototype.create.call(this, resource, __assign({ spaceName: this.spaceName }, args)); + }; + SpaceScopedBasicRepository.prototype.get = function (id) { + return this.client.request("".concat(this.baseApiPathTemplate, "/").concat(id), { spaceName: this.spaceName }); + }; + SpaceScopedBasicRepository.prototype.list = function (args) { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + return _super.prototype.list.call(this, __assign({ spaceName: this.spaceName }, args)); + }; + SpaceScopedBasicRepository.prototype.modify = function (resource, args) { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + return _super.prototype.modify.call(this, resource, __assign({ spaceName: this.spaceName }, args)); + }; + return SpaceScopedBasicRepository; +}(basicRepository_1.BasicRepository)); +exports.SpaceScopedBasicRepository = SpaceScopedBasicRepository; /***/ }), @@ -6247,24 +6253,24 @@ exports.SpaceScopedBasicRepository = SpaceScopedBasicRepository; /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(7970), exports); -__exportStar(__nccwpck_require__(4778), exports); + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(7970), exports); +__exportStar(__nccwpck_require__(4778), exports); /***/ }), @@ -6273,8 +6279,8 @@ __exportStar(__nccwpck_require__(4778), exports); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -6283,34 +6289,34 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SpaceRepository = void 0; -var __1 = __nccwpck_require__(586); -var basicRepository_1 = __nccwpck_require__(2966); -var SpaceRepository = /** @class */ (function (_super) { - __extends(SpaceRepository, _super); - function SpaceRepository(client) { - return _super.call(this, client, "".concat(__1.apiLocation, "/spaces"), "skip,ids,take,partialName") || this; - } - return SpaceRepository; -}(basicRepository_1.BasicRepository)); -exports.SpaceRepository = SpaceRepository; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SpaceRepository = void 0; +var __1 = __nccwpck_require__(586); +var basicRepository_1 = __nccwpck_require__(2966); +var SpaceRepository = /** @class */ (function (_super) { + __extends(SpaceRepository, _super); + function SpaceRepository(client) { + return _super.call(this, client, "".concat(__1.apiLocation, "/spaces"), "skip,ids,take,partialName") || this; + } + return SpaceRepository; +}(basicRepository_1.BasicRepository)); +exports.SpaceRepository = SpaceRepository; /***/ }), @@ -6319,25 +6325,25 @@ exports.SpaceRepository = SpaceRepository; /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(7635), exports); -__exportStar(__nccwpck_require__(240), exports); -__exportStar(__nccwpck_require__(1970), exports); + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(7635), exports); +__exportStar(__nccwpck_require__(240), exports); +__exportStar(__nccwpck_require__(1970), exports); /***/ }), @@ -6346,8 +6352,8 @@ __exportStar(__nccwpck_require__(1970), exports); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -6356,8 +6362,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -6366,37 +6372,37 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TagSetRepository = void 0; -var spaceScopedRoutePrefix_1 = __nccwpck_require__(7218); -var spaceScopedBasicRepository_1 = __nccwpck_require__(3496); -var TagSetRepository = /** @class */ (function (_super) { - __extends(TagSetRepository, _super); - function TagSetRepository(client, spaceName) { - return _super.call(this, client, spaceName, "".concat(spaceScopedRoutePrefix_1.spaceScopedRoutePrefix, "/tagsets"), "skip,take,ids,partialName") || this; - } - TagSetRepository.prototype.sort = function (ids) { - return this.client.doUpdate("".concat(spaceScopedRoutePrefix_1.spaceScopedRoutePrefix, "/tagsets/sortorder"), ids, { spaceName: this.spaceName }); - }; - return TagSetRepository; -}(spaceScopedBasicRepository_1.SpaceScopedBasicRepository)); -exports.TagSetRepository = TagSetRepository; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TagSetRepository = void 0; +var spaceScopedRoutePrefix_1 = __nccwpck_require__(7218); +var spaceScopedBasicRepository_1 = __nccwpck_require__(3496); +var TagSetRepository = /** @class */ (function (_super) { + __extends(TagSetRepository, _super); + function TagSetRepository(client, spaceName) { + return _super.call(this, client, spaceName, "".concat(spaceScopedRoutePrefix_1.spaceScopedRoutePrefix, "/tagsets"), "skip,take,ids,partialName") || this; + } + TagSetRepository.prototype.sort = function (ids) { + return this.client.doUpdate("".concat(spaceScopedRoutePrefix_1.spaceScopedRoutePrefix, "/tagsets/sortorder"), ids, { spaceName: this.spaceName }); + }; + return TagSetRepository; +}(spaceScopedBasicRepository_1.SpaceScopedBasicRepository)); +exports.TagSetRepository = TagSetRepository; /***/ }), @@ -6405,26 +6411,26 @@ exports.TagSetRepository = TagSetRepository; /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(5305), exports); -__exportStar(__nccwpck_require__(7026), exports); -__exportStar(__nccwpck_require__(7444), exports); -__exportStar(__nccwpck_require__(2830), exports); + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(5305), exports); +__exportStar(__nccwpck_require__(7026), exports); +__exportStar(__nccwpck_require__(7444), exports); +__exportStar(__nccwpck_require__(2830), exports); /***/ }), @@ -6433,8 +6439,8 @@ __exportStar(__nccwpck_require__(2830), exports); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -6443,8 +6449,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -6453,54 +6459,54 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TenantRepository = void 0; -var __1 = __nccwpck_require__(586); -var spaceScopedBasicRepository_1 = __nccwpck_require__(3496); -var TenantRepository = /** @class */ (function (_super) { - __extends(TenantRepository, _super); - function TenantRepository(client, spaceName) { - return _super.call(this, client, spaceName, "".concat(__1.spaceScopedRoutePrefix, "/tenants"), "skip,projectId,tags,take,ids,clone,partialName,clonedFromTenantId") || this; - } - TenantRepository.prototype.tagTest = function (tenantIds, tags) { - return this.client.request("".concat(__1.spaceScopedRoutePrefix, "/tenants/tag-test{?tenantIds,tags}"), { tenantIds: tenantIds, tags: tags }); - }; - TenantRepository.prototype.getVariables = function (tenant) { - return this.client.request("".concat(__1.spaceScopedRoutePrefix, "/tenants/{id}/variables")); - }; - TenantRepository.prototype.setVariables = function (tenant, variables) { - return this.client.doUpdate("".concat(__1.spaceScopedRoutePrefix, "/tenants/{id}/variables"), variables); - }; - TenantRepository.prototype.missingVariables = function (filterOptions, includeDetails) { - if (filterOptions === void 0) { filterOptions = {}; } - if (includeDetails === void 0) { includeDetails = false; } - var payload = { - environmentId: filterOptions.environmentId, - includeDetails: includeDetails, - projectId: filterOptions.projectId, - tenantId: filterOptions.tenantId, - }; - return this.client.request("".concat(__1.spaceScopedRoutePrefix, "/tenants/variables-missing{?tenantId,projectId,environmentId,includeDetails}"), payload); - }; - return TenantRepository; -}(spaceScopedBasicRepository_1.SpaceScopedBasicRepository)); -exports.TenantRepository = TenantRepository; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TenantRepository = void 0; +var __1 = __nccwpck_require__(586); +var spaceScopedBasicRepository_1 = __nccwpck_require__(3496); +var TenantRepository = /** @class */ (function (_super) { + __extends(TenantRepository, _super); + function TenantRepository(client, spaceName) { + return _super.call(this, client, spaceName, "".concat(__1.spaceScopedRoutePrefix, "/tenants"), "skip,projectId,tags,take,ids,clone,partialName,clonedFromTenantId") || this; + } + TenantRepository.prototype.tagTest = function (tenantIds, tags) { + return this.client.request("".concat(__1.spaceScopedRoutePrefix, "/tenants/tag-test{?tenantIds,tags}"), { tenantIds: tenantIds, tags: tags }); + }; + TenantRepository.prototype.getVariables = function (tenant) { + return this.client.request("".concat(__1.spaceScopedRoutePrefix, "/tenants/{id}/variables")); + }; + TenantRepository.prototype.setVariables = function (tenant, variables) { + return this.client.doUpdate("".concat(__1.spaceScopedRoutePrefix, "/tenants/{id}/variables"), variables); + }; + TenantRepository.prototype.missingVariables = function (filterOptions, includeDetails) { + if (filterOptions === void 0) { filterOptions = {}; } + if (includeDetails === void 0) { includeDetails = false; } + var payload = { + environmentId: filterOptions.environmentId, + includeDetails: includeDetails, + projectId: filterOptions.projectId, + tenantId: filterOptions.tenantId, + }; + return this.client.request("".concat(__1.spaceScopedRoutePrefix, "/tenants/variables-missing{?tenantId,projectId,environmentId,includeDetails}"), payload); + }; + return TenantRepository; +}(spaceScopedBasicRepository_1.SpaceScopedBasicRepository)); +exports.TenantRepository = TenantRepository; /***/ }), @@ -6509,8 +6515,8 @@ exports.TenantRepository = TenantRepository; /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -6519,8 +6525,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -6529,16 +6535,16 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.IdentityType = void 0; -var IdentityType; -(function (IdentityType) { - IdentityType["Guest"] = "Guest"; - IdentityType["UsernamePassword"] = "UsernamePassword"; - IdentityType["ActiveDirectory"] = "ActiveDirectory"; - IdentityType["OAuth"] = "OAuth"; -})(IdentityType = exports.IdentityType || (exports.IdentityType = {})); + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.IdentityType = void 0; +var IdentityType; +(function (IdentityType) { + IdentityType["Guest"] = "Guest"; + IdentityType["UsernamePassword"] = "UsernamePassword"; + IdentityType["ActiveDirectory"] = "ActiveDirectory"; + IdentityType["OAuth"] = "OAuth"; +})(IdentityType = exports.IdentityType || (exports.IdentityType = {})); /***/ }), @@ -6547,89 +6553,89 @@ var IdentityType; /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(41), exports); -__exportStar(__nccwpck_require__(1321), exports); -__exportStar(__nccwpck_require__(4438), exports); -__exportStar(__nccwpck_require__(1380), exports); + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(41), exports); +__exportStar(__nccwpck_require__(1321), exports); +__exportStar(__nccwpck_require__(4438), exports); +__exportStar(__nccwpck_require__(1380), exports); /***/ }), -/***/ 1380: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"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()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.userGetCurrent = void 0; -var __1 = __nccwpck_require__(586); -function userGetCurrent(client) { - return __awaiter(this, void 0, void 0, function () { - var user; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, client.get("".concat(__1.apiLocation, "/users/me"))]; - case 1: - user = _a.sent(); - return [2 /*return*/, user]; - } - }); - }); -} -exports.userGetCurrent = userGetCurrent; - +/***/ 1380: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"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()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.userGetCurrent = void 0; +var __1 = __nccwpck_require__(586); +function userGetCurrent(client) { + return __awaiter(this, void 0, void 0, function () { + var user; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, client.get("".concat(__1.apiLocation, "/users/me"))]; + case 1: + user = _a.sent(); + return [2 /*return*/, user]; + } + }); + }); +} +exports.userGetCurrent = userGetCurrent; + /***/ }), @@ -6637,8 +6643,8 @@ exports.userGetCurrent = userGetCurrent; /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -6647,23 +6653,23 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(9790), exports); + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(9790), exports); /***/ }), @@ -6672,24 +6678,24 @@ __exportStar(__nccwpck_require__(9790), exports); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isSensitiveValue = exports.NewSensitiveValue = void 0; -function NewSensitiveValue(value, hint) { - return { - HasValue: true, - Hint: hint, - NewValue: value, - }; -} -exports.NewSensitiveValue = NewSensitiveValue; -function isSensitiveValue(value) { - if (typeof value === "string" || value === null) { - return false; - } - return Object.prototype.hasOwnProperty.call(value, "HasValue"); -} -exports.isSensitiveValue = isSensitiveValue; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isSensitiveValue = exports.NewSensitiveValue = void 0; +function NewSensitiveValue(value, hint) { + return { + HasValue: true, + Hint: hint, + NewValue: value, + }; +} +exports.NewSensitiveValue = NewSensitiveValue; +function isSensitiveValue(value) { + if (typeof value === "string" || value === null) { + return false; + } + return Object.prototype.hasOwnProperty.call(value, "HasValue"); +} +exports.isSensitiveValue = isSensitiveValue; /***/ }), @@ -6698,50 +6704,50 @@ exports.isSensitiveValue = isSensitiveValue; /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(5024), exports); -__exportStar(__nccwpck_require__(1542), exports); -__exportStar(__nccwpck_require__(7083), exports); -__exportStar(__nccwpck_require__(3024), exports); -__exportStar(__nccwpck_require__(2399), exports); -__exportStar(__nccwpck_require__(5966), exports); -__exportStar(__nccwpck_require__(2101), exports); -__exportStar(__nccwpck_require__(7948), exports); -__exportStar(__nccwpck_require__(6397), exports); -__exportStar(__nccwpck_require__(5758), exports); -__exportStar(__nccwpck_require__(6050), exports); -__exportStar(__nccwpck_require__(661), exports); -__exportStar(__nccwpck_require__(5924), exports); -__exportStar(__nccwpck_require__(6447), exports); -__exportStar(__nccwpck_require__(5435), exports); -__exportStar(__nccwpck_require__(8043), exports); -__exportStar(__nccwpck_require__(2850), exports); -__exportStar(__nccwpck_require__(6742), exports); -__exportStar(__nccwpck_require__(2138), exports); -__exportStar(__nccwpck_require__(232), exports); -__exportStar(__nccwpck_require__(2054), exports); -__exportStar(__nccwpck_require__(5626), exports); -__exportStar(__nccwpck_require__(3667), exports); -__exportStar(__nccwpck_require__(3295), exports); -__exportStar(__nccwpck_require__(492), exports); -__exportStar(__nccwpck_require__(7218), exports); -__exportStar(__nccwpck_require__(1547), exports); -__exportStar(__nccwpck_require__(7132), exports); + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(5024), exports); +__exportStar(__nccwpck_require__(1542), exports); +__exportStar(__nccwpck_require__(7083), exports); +__exportStar(__nccwpck_require__(3024), exports); +__exportStar(__nccwpck_require__(2399), exports); +__exportStar(__nccwpck_require__(5966), exports); +__exportStar(__nccwpck_require__(2101), exports); +__exportStar(__nccwpck_require__(7948), exports); +__exportStar(__nccwpck_require__(6397), exports); +__exportStar(__nccwpck_require__(5758), exports); +__exportStar(__nccwpck_require__(6050), exports); +__exportStar(__nccwpck_require__(661), exports); +__exportStar(__nccwpck_require__(5924), exports); +__exportStar(__nccwpck_require__(6447), exports); +__exportStar(__nccwpck_require__(5435), exports); +__exportStar(__nccwpck_require__(8043), exports); +__exportStar(__nccwpck_require__(2850), exports); +__exportStar(__nccwpck_require__(6742), exports); +__exportStar(__nccwpck_require__(2138), exports); +__exportStar(__nccwpck_require__(232), exports); +__exportStar(__nccwpck_require__(2054), exports); +__exportStar(__nccwpck_require__(5626), exports); +__exportStar(__nccwpck_require__(3667), exports); +__exportStar(__nccwpck_require__(3295), exports); +__exportStar(__nccwpck_require__(492), exports); +__exportStar(__nccwpck_require__(7218), exports); +__exportStar(__nccwpck_require__(1547), exports); +__exportStar(__nccwpck_require__(7132), exports); /***/ }), @@ -6750,8 +6756,8 @@ __exportStar(__nccwpck_require__(7132), exports); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -6760,8 +6766,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -6770,57 +6776,57 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ (function(__unused_webpack_module, exports) { "use strict"; - -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -/* eslint-disable @typescript-eslint/no-explicit-any */ -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OctopusError = void 0; -// Octopus prefix is used here as there is already a built-in type called Error -var OctopusError = /** @class */ (function (_super) { - __extends(OctopusError, _super); - function OctopusError(StatusCode, message) { - var _this = _super.call(this, message) || this; - _this.StatusCode = StatusCode; - _this.ErrorMessage = message; - _this.Errors = []; - Object.setPrototypeOf(_this, OctopusError.prototype); - return _this; - } - OctopusError.create = function (statusCode, response) { - var e = new OctopusError(statusCode); - var n = __assign(__assign({}, e), response); - Object.setPrototypeOf(n, OctopusError.prototype); - return n; - }; - return OctopusError; -}(Error)); -exports.OctopusError = OctopusError; + +/* eslint-disable @typescript-eslint/no-non-null-assertion */ +/* eslint-disable @typescript-eslint/no-explicit-any */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.OctopusError = void 0; +// Octopus prefix is used here as there is already a built-in type called Error +var OctopusError = /** @class */ (function (_super) { + __extends(OctopusError, _super); + function OctopusError(StatusCode, message) { + var _this = _super.call(this, message) || this; + _this.StatusCode = StatusCode; + _this.ErrorMessage = message; + _this.Errors = []; + Object.setPrototypeOf(_this, OctopusError.prototype); + return _this; + } + OctopusError.create = function (statusCode, response) { + var e = new OctopusError(statusCode); + var n = __assign(__assign({}, e), response); + Object.setPrototypeOf(n, OctopusError.prototype); + return n; + }; + return OctopusError; +}(Error)); +exports.OctopusError = OctopusError; /***/ }), @@ -6829,8 +6835,8 @@ exports.OctopusError = OctopusError; /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -6839,49 +6845,49 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -/* eslint-disable @typescript-eslint/no-explicit-any */ -/* eslint-disable @typescript-eslint/consistent-type-assertions */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Resolver = void 0; -var URI = __nccwpck_require__(4190); -var URITemplate = __nccwpck_require__(3423); -var Resolver = /** @class */ (function () { - function Resolver(baseUri) { - this.baseUri = baseUri; - this.baseUri = this.baseUri.endsWith("/") ? this.baseUri : this.baseUri + "/"; - var lastIndexOfMandatorySegment = this.baseUri.lastIndexOf("/api/"); - if (lastIndexOfMandatorySegment >= 1) { - this.baseUri = this.baseUri.substring(0, lastIndexOfMandatorySegment); - } - else { - if (this.baseUri.endsWith("/api")) { - this.baseUri = this.baseUri.substring(0, -4); - } - } - this.baseUri = this.baseUri.endsWith("/") ? this.baseUri.substring(0, this.baseUri.length - 1) : this.baseUri; - var parsed = URI(this.baseUri); - this.rootUri = parsed.scheme() + "://" + parsed.authority(); - this.rootUri = this.rootUri.endsWith("/") ? this.rootUri.substring(0, this.rootUri.length - 1) : this.rootUri; - } - Resolver.prototype.resolve = function (path, uriTemplateParameters) { - if (!path) { - throw new Error("The link is not set to a value"); - } - if (path.startsWith("~/")) { - path = path.substring(1, path.length); - path = this.baseUri + path; - } - else { - path = this.rootUri + path; - } - var template = new URITemplate(path); - var result = template.expand(uriTemplateParameters || {}); - return result; - }; - return Resolver; -}()); -exports.Resolver = Resolver; + +/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/consistent-type-assertions */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Resolver = void 0; +var URI = __nccwpck_require__(4190); +var URITemplate = __nccwpck_require__(3423); +var Resolver = /** @class */ (function () { + function Resolver(baseUri) { + this.baseUri = baseUri; + this.baseUri = this.baseUri.endsWith("/") ? this.baseUri : this.baseUri + "/"; + var lastIndexOfMandatorySegment = this.baseUri.lastIndexOf("/api/"); + if (lastIndexOfMandatorySegment >= 1) { + this.baseUri = this.baseUri.substring(0, lastIndexOfMandatorySegment); + } + else { + if (this.baseUri.endsWith("/api")) { + this.baseUri = this.baseUri.substring(0, -4); + } + } + this.baseUri = this.baseUri.endsWith("/") ? this.baseUri.substring(0, this.baseUri.length - 1) : this.baseUri; + var parsed = URI(this.baseUri); + this.rootUri = parsed.scheme() + "://" + parsed.authority(); + this.rootUri = this.rootUri.endsWith("/") ? this.rootUri.substring(0, this.rootUri.length - 1) : this.rootUri; + } + Resolver.prototype.resolve = function (path, uriTemplateParameters) { + if (!path) { + throw new Error("The link is not set to a value"); + } + if (path.startsWith("~/")) { + path = path.substring(1, path.length); + path = this.baseUri + path; + } + else { + path = this.rootUri + path; + } + var template = new URITemplate(path); + var result = template.expand(uriTemplateParameters || {}); + return result; + }; + return Resolver; +}()); +exports.Resolver = Resolver; /***/ }), @@ -6890,13 +6896,13 @@ exports.Resolver = Resolver; /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isResource = void 0; -function isResource(resource) { - return "Id" in resource; -} -exports.isResource = isResource; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isResource = void 0; +function isResource(resource) { + return "Id" in resource; +} +exports.isResource = isResource; /***/ }), @@ -6905,8 +6911,8 @@ exports.isResource = isResource; /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -6915,8 +6921,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -6925,8 +6931,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), @@ -6935,82 +6941,82 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "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()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.resolveSpaceId = void 0; -var apiLocation_1 = __nccwpck_require__(7083); -var knownSpaces = {}; -function resolveSpaceId(client, spaceName) { - return __awaiter(this, void 0, void 0, function () { - var spaces, spaceId; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (knownSpaces[spaceName]) { - return [2 /*return*/, knownSpaces[spaceName]]; - } - client.debug("Resolving space from name '".concat(spaceName, "'")); - return [4 /*yield*/, client.get("".concat(apiLocation_1.apiLocation, "/spaces"), { partialName: spaceName })]; - case 1: - spaces = _a.sent(); - spaceId = ""; - if (spaces.TotalResults === 0) { - client.error("No spaces exist with name '".concat(spaceName, "'")); - throw new Error("No spaces exist with name '".concat(spaceName, "'")); - } - spaces.Items.forEach(function (space) { - if (space.Name == spaceName) { - spaceId = space.Id; - knownSpaces[spaceName] = spaceId; - client.debug("Resolved space name '".concat(spaceName, "' to Id ").concat(spaceId)); - } - }); - if (spaceId === "") { - client.error("Unable to resolve space name '".concat(spaceName, "'")); - throw new Error("Unable to resolve space name '".concat(spaceName, "'")); - } - return [2 /*return*/, spaceId]; - } - }); - }); -} -exports.resolveSpaceId = resolveSpaceId; + +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()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveSpaceId = void 0; +var apiLocation_1 = __nccwpck_require__(7083); +var knownSpaces = {}; +function resolveSpaceId(client, spaceName) { + return __awaiter(this, void 0, void 0, function () { + var spaces, spaceId; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (knownSpaces[spaceName]) { + return [2 /*return*/, knownSpaces[spaceName]]; + } + client.debug("Resolving space from name '".concat(spaceName, "'")); + return [4 /*yield*/, client.get("".concat(apiLocation_1.apiLocation, "/spaces"), { partialName: spaceName })]; + case 1: + spaces = _a.sent(); + spaceId = ""; + if (spaces.TotalResults === 0) { + client.error("No spaces exist with name '".concat(spaceName, "'")); + throw new Error("No spaces exist with name '".concat(spaceName, "'")); + } + spaces.Items.forEach(function (space) { + if (space.Name == spaceName) { + spaceId = space.Id; + knownSpaces[spaceName] = spaceId; + client.debug("Resolved space name '".concat(spaceName, "' to Id ").concat(spaceId)); + } + }); + if (spaceId === "") { + client.error("Unable to resolve space name '".concat(spaceName, "'")); + throw new Error("Unable to resolve space name '".concat(spaceName, "'")); + } + return [2 /*return*/, spaceId]; + } + }); + }); +} +exports.resolveSpaceId = resolveSpaceId; /***/ }), @@ -7019,13 +7025,13 @@ exports.resolveSpaceId = resolveSpaceId; /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isSpaceScopedArgs = void 0; -function isSpaceScopedArgs(args) { - return "spaceName" in args; -} -exports.isSpaceScopedArgs = isSpaceScopedArgs; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isSpaceScopedArgs = void 0; +function isSpaceScopedArgs(args) { + return "spaceName" in args; +} +exports.isSpaceScopedArgs = isSpaceScopedArgs; /***/ }), @@ -7034,13 +7040,13 @@ exports.isSpaceScopedArgs = isSpaceScopedArgs; /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isSpaceScopedOperation = void 0; -function isSpaceScopedOperation(command) { - return "spaceName" in command; -} -exports.isSpaceScopedOperation = isSpaceScopedOperation; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isSpaceScopedOperation = void 0; +function isSpaceScopedOperation(command) { + return "spaceName" in command; +} +exports.isSpaceScopedOperation = isSpaceScopedOperation; /***/ }), @@ -7049,13 +7055,13 @@ exports.isSpaceScopedOperation = isSpaceScopedOperation; /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isSpaceScopedRequest = void 0; -function isSpaceScopedRequest(command) { - return "spaceName" in command; -} -exports.isSpaceScopedRequest = isSpaceScopedRequest; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isSpaceScopedRequest = void 0; +function isSpaceScopedRequest(command) { + return "spaceName" in command; +} +exports.isSpaceScopedRequest = isSpaceScopedRequest; /***/ }), @@ -7064,13 +7070,13 @@ exports.isSpaceScopedRequest = isSpaceScopedRequest; /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isSpaceScopedResource = void 0; -function isSpaceScopedResource(resource) { - return "SpaceId" in resource; -} -exports.isSpaceScopedResource = isSpaceScopedResource; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isSpaceScopedResource = void 0; +function isSpaceScopedResource(resource) { + return "SpaceId" in resource; +} +exports.isSpaceScopedResource = isSpaceScopedResource; /***/ }), @@ -7079,11 +7085,11 @@ exports.isSpaceScopedResource = isSpaceScopedResource; /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.spaceScopedRoutePrefix = void 0; -var apiLocation_1 = __nccwpck_require__(7083); -exports.spaceScopedRoutePrefix = "".concat(apiLocation_1.apiLocation, "/{spaceId}"); + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.spaceScopedRoutePrefix = void 0; +var apiLocation_1 = __nccwpck_require__(7083); +exports.spaceScopedRoutePrefix = "".concat(apiLocation_1.apiLocation, "/{spaceId}"); /***/ }), @@ -7092,38 +7098,38 @@ exports.spaceScopedRoutePrefix = "".concat(apiLocation_1.apiLocation, "/{spaceId /***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SubscriptionRecord = void 0; -var SubscriptionRecord = /** @class */ (function () { - function SubscriptionRecord() { - this.subscriptions = {}; - } - SubscriptionRecord.prototype.subscribe = function (registrationName, callback) { - var _this = this; - this.subscriptions[registrationName] = callback; - return function () { return _this.unsubscribe(registrationName); }; - }; - SubscriptionRecord.prototype.unsubscribe = function (registrationName) { - delete this.subscriptions[registrationName]; - }; - SubscriptionRecord.prototype.notify = function (predicate, data) { - var _this = this; - Object.keys(this.subscriptions) - .filter(predicate) - .forEach(function (key) { return _this.subscriptions[key](data); }); - }; - SubscriptionRecord.prototype.notifyAll = function (data) { - this.notify(function () { return true; }, data); - }; - SubscriptionRecord.prototype.notifySingle = function (registrationName, data) { - if (registrationName in this.subscriptions) { - this.subscriptions[registrationName](data); - } - }; - return SubscriptionRecord; -}()); -exports.SubscriptionRecord = SubscriptionRecord; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SubscriptionRecord = void 0; +var SubscriptionRecord = /** @class */ (function () { + function SubscriptionRecord() { + this.subscriptions = {}; + } + SubscriptionRecord.prototype.subscribe = function (registrationName, callback) { + var _this = this; + this.subscriptions[registrationName] = callback; + return function () { return _this.unsubscribe(registrationName); }; + }; + SubscriptionRecord.prototype.unsubscribe = function (registrationName) { + delete this.subscriptions[registrationName]; + }; + SubscriptionRecord.prototype.notify = function (predicate, data) { + var _this = this; + Object.keys(this.subscriptions) + .filter(predicate) + .forEach(function (key) { return _this.subscriptions[key](data); }); + }; + SubscriptionRecord.prototype.notifyAll = function (data) { + this.notify(function () { return true; }, data); + }; + SubscriptionRecord.prototype.notifySingle = function (registrationName, data) { + if (registrationName in this.subscriptions) { + this.subscriptions[registrationName](data); + } + }; + return SubscriptionRecord; +}()); +exports.SubscriptionRecord = SubscriptionRecord; /***/ }), @@ -7132,56 +7138,56 @@ exports.SubscriptionRecord = SubscriptionRecord; /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isPropertyDefinedAndNotNull = exports.typeSafeHasOwnProperty = exports.ensureSuffix = exports.ensurePrefix = exports.determineServerEndpoint = exports.getResolver = exports.getServerEndpoint = exports.getQueryValue = void 0; -var lodash_1 = __nccwpck_require__(250); -var urijs_1 = __importDefault(__nccwpck_require__(4190)); -var resolver_1 = __nccwpck_require__(8043); -var getQueryValue = function (key, location) { - var result; - (0, urijs_1.default)(location).hasQuery(key, function (value) { - result = value; - }); - return result; -}; -exports.getQueryValue = getQueryValue; -var getServerEndpoint = function (location) { - if (location === void 0) { location = window.location; } - return (0, exports.getQueryValue)("octopus.server", location.href) || (0, exports.determineServerEndpoint)(location); -}; -exports.getServerEndpoint = getServerEndpoint; -var getResolver = function (base) { - var resolver = new resolver_1.Resolver(base); - return resolver.resolve.bind(resolver); -}; -exports.getResolver = getResolver; -var determineServerEndpoint = function (location) { - var endpoint = (0, exports.ensureSuffix)("//", "" + location.protocol) + location.host; - var path = (0, exports.ensurePrefix)("/", location.pathname); - if (path.length >= 1) { - var lastSegmentIndex = path.lastIndexOf("/"); - if (lastSegmentIndex >= 0) { - path = path.substring(0, lastSegmentIndex + 1); - } - } - endpoint = endpoint + path; - return endpoint; -}; -exports.determineServerEndpoint = determineServerEndpoint; -exports.ensurePrefix = (0, lodash_1.curry)(function (prefix, value) { return (!value.startsWith(prefix) ? "".concat(prefix).concat(value) : value); }); -exports.ensureSuffix = (0, lodash_1.curry)(function (suffix, value) { return (!value.endsWith(suffix) ? "".concat(value).concat(suffix) : value); }); -var typeSafeHasOwnProperty = function (target, key) { - return target.hasOwnProperty(key); -}; -exports.typeSafeHasOwnProperty = typeSafeHasOwnProperty; -var isPropertyDefinedAndNotNull = function (target, key) { - return (0, exports.typeSafeHasOwnProperty)(target, key) && target[key] !== null && target[key] !== undefined; -}; -exports.isPropertyDefinedAndNotNull = isPropertyDefinedAndNotNull; + +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isPropertyDefinedAndNotNull = exports.typeSafeHasOwnProperty = exports.ensureSuffix = exports.ensurePrefix = exports.determineServerEndpoint = exports.getResolver = exports.getServerEndpoint = exports.getQueryValue = void 0; +var lodash_1 = __nccwpck_require__(250); +var urijs_1 = __importDefault(__nccwpck_require__(4190)); +var resolver_1 = __nccwpck_require__(8043); +var getQueryValue = function (key, location) { + var result; + (0, urijs_1.default)(location).hasQuery(key, function (value) { + result = value; + }); + return result; +}; +exports.getQueryValue = getQueryValue; +var getServerEndpoint = function (location) { + if (location === void 0) { location = window.location; } + return (0, exports.getQueryValue)("octopus.server", location.href) || (0, exports.determineServerEndpoint)(location); +}; +exports.getServerEndpoint = getServerEndpoint; +var getResolver = function (base) { + var resolver = new resolver_1.Resolver(base); + return resolver.resolve.bind(resolver); +}; +exports.getResolver = getResolver; +var determineServerEndpoint = function (location) { + var endpoint = (0, exports.ensureSuffix)("//", "" + location.protocol) + location.host; + var path = (0, exports.ensurePrefix)("/", location.pathname); + if (path.length >= 1) { + var lastSegmentIndex = path.lastIndexOf("/"); + if (lastSegmentIndex >= 0) { + path = path.substring(0, lastSegmentIndex + 1); + } + } + endpoint = endpoint + path; + return endpoint; +}; +exports.determineServerEndpoint = determineServerEndpoint; +exports.ensurePrefix = (0, lodash_1.curry)(function (prefix, value) { return (!value.startsWith(prefix) ? "".concat(prefix).concat(value) : value); }); +exports.ensureSuffix = (0, lodash_1.curry)(function (suffix, value) { return (!value.endsWith(suffix) ? "".concat(value).concat(suffix) : value); }); +var typeSafeHasOwnProperty = function (target, key) { + return target.hasOwnProperty(key); +}; +exports.typeSafeHasOwnProperty = typeSafeHasOwnProperty; +var isPropertyDefinedAndNotNull = function (target, key) { + return (0, exports.typeSafeHasOwnProperty)(target, key) && target[key] !== null && target[key] !== undefined; +}; +exports.isPropertyDefinedAndNotNull = isPropertyDefinedAndNotNull; /***/ }), diff --git a/package-lock.json b/package-lock.json index 2b2f49d..1151629 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "Apache-2.0", "dependencies": { "@actions/core": "^1.10.0", - "@octopusdeploy/api-client": "^2.1.0", + "@octopusdeploy/api-client": "github:OctopusDeploy/api-client.ts#bug-directoryhandling", "glob": "^8.0.3" }, "devDependencies": { @@ -1241,8 +1241,8 @@ }, "node_modules/@octopusdeploy/api-client": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@octopusdeploy/api-client/-/api-client-2.1.0.tgz", - "integrity": "sha512-6qabUJzMPMpkoCxS/j1AmTZS8sRXJk2ep+8d/axslGywxNAkYGLVxCkfAr3n93KvALGWn6oPjUk79wv/46trVw==", + "resolved": "git+ssh://git@github.com/OctopusDeploy/api-client.ts.git#f3bf14747723ad806133e473abc58315f10660e2", + "license": "Apache-2.0", "dependencies": { "adm-zip": "^0.5.9", "axios": "^0.27.2", @@ -7093,9 +7093,8 @@ } }, "@octopusdeploy/api-client": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@octopusdeploy/api-client/-/api-client-2.1.0.tgz", - "integrity": "sha512-6qabUJzMPMpkoCxS/j1AmTZS8sRXJk2ep+8d/axslGywxNAkYGLVxCkfAr3n93KvALGWn6oPjUk79wv/46trVw==", + "version": "git+ssh://git@github.com/OctopusDeploy/api-client.ts.git#f3bf14747723ad806133e473abc58315f10660e2", + "from": "@octopusdeploy/api-client@github:OctopusDeploy/api-client.ts#bug-directoryhandling", "requires": { "adm-zip": "^0.5.9", "axios": "^0.27.2", diff --git a/package.json b/package.json index 3bab8a4..70b967a 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ }, "dependencies": { "@actions/core": "^1.10.0", - "@octopusdeploy/api-client": "^2.1.0", + "@octopusdeploy/api-client": "github:OctopusDeploy/api-client.ts#bug-directoryhandling", "glob": "^8.0.3" }, "description": "GitHub Action to Push a Package to Octopus Deploy",