diff --git a/dist/cleanup/index.js b/dist/cleanup/index.js index 2859e28..ab04a9d 100644 --- a/dist/cleanup/index.js +++ b/dist/cleanup/index.js @@ -49,6 +49,21 @@ module.exports = /************************************************************************/ /******/ ({ +/***/ 4: +/***/ (function(__unusedmodule, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _default = '00000000-0000-0000-0000-000000000000'; +exports.default = _default; + +/***/ }), + /***/ 16: /***/ (function(module) { @@ -56,6 +71,92 @@ module.exports = require("tls"); /***/ }), +/***/ 25: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "v1", { + enumerable: true, + get: function () { + return _v.default; + } +}); +Object.defineProperty(exports, "v3", { + enumerable: true, + get: function () { + return _v2.default; + } +}); +Object.defineProperty(exports, "v4", { + enumerable: true, + get: function () { + return _v3.default; + } +}); +Object.defineProperty(exports, "v5", { + enumerable: true, + get: function () { + return _v4.default; + } +}); +Object.defineProperty(exports, "NIL", { + enumerable: true, + get: function () { + return _nil.default; + } +}); +Object.defineProperty(exports, "version", { + enumerable: true, + get: function () { + return _version.default; + } +}); +Object.defineProperty(exports, "validate", { + enumerable: true, + get: function () { + return _validate.default; + } +}); +Object.defineProperty(exports, "stringify", { + enumerable: true, + get: function () { + return _stringify.default; + } +}); +Object.defineProperty(exports, "parse", { + enumerable: true, + get: function () { + return _parse.default; + } +}); + +var _v = _interopRequireDefault(__webpack_require__(810)); + +var _v2 = _interopRequireDefault(__webpack_require__(572)); + +var _v3 = _interopRequireDefault(__webpack_require__(293)); + +var _v4 = _interopRequireDefault(__webpack_require__(638)); + +var _nil = _interopRequireDefault(__webpack_require__(4)); + +var _version = _interopRequireDefault(__webpack_require__(135)); + +var _validate = _interopRequireDefault(__webpack_require__(634)); + +var _stringify = _interopRequireDefault(__webpack_require__(960)); + +var _parse = _interopRequireDefault(__webpack_require__(204)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/***/ }), + /***/ 82: /***/ (function(__unusedmodule, exports) { @@ -159,6 +260,119 @@ exports.issueCommand = issueCommand; /***/ }), +/***/ 135: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _validate = _interopRequireDefault(__webpack_require__(634)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function version(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + return parseInt(uuid.substr(14, 1), 16); +} + +var _default = version; +exports.default = _default; + +/***/ }), + +/***/ 136: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +exports.URL = exports.DNS = void 0; + +var _stringify = _interopRequireDefault(__webpack_require__(960)); + +var _parse = _interopRequireDefault(__webpack_require__(204)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + + const bytes = []; + + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + + return bytes; +} + +const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; +exports.DNS = DNS; +const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; +exports.URL = URL; + +function _default(name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + if (typeof value === 'string') { + value = stringToBytes(value); + } + + if (typeof namespace === 'string') { + namespace = (0, _parse.default)(namespace); + } + + if (namespace.length !== 16) { + throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); + } // Compute hash of namespace and value, Per 4.3 + // Future: Use spread syntax when supported on all platforms, e.g. `bytes = + // hashfunc([...namespace, ... value])` + + + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 0x0f | version; + bytes[8] = bytes[8] & 0x3f | 0x80; + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + + return buf; + } + + return (0, _stringify.default)(bytes); + } // Function#name is not settable on some platforms (#270) + + + try { + generateUUID.name = name; // eslint-disable-next-line no-empty + } catch (err) {} // For CommonJS default export support + + + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; +} + +/***/ }), + /***/ 141: /***/ (function(__unusedmodule, exports, __webpack_require__) { @@ -472,6 +686,126 @@ if (require.main === require.cache[eval('__filename')]) { } +/***/ }), + +/***/ 177: +/***/ (function(__unusedmodule, exports) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.checkBypass = exports.getProxyUrl = void 0; +function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === 'https:'; + if (checkBypass(reqUrl)) { + return undefined; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env['https_proxy'] || process.env['HTTPS_PROXY']; + } + else { + return process.env['http_proxy'] || process.env['HTTP_PROXY']; + } + })(); + if (proxyVar) { + return new URL(proxyVar); + } + else { + return undefined; + } +} +exports.getProxyUrl = getProxyUrl; +function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; + if (!noProxy) { + return false; + } + // Determine the request port + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } + else if (reqUrl.protocol === 'http:') { + reqPort = 80; + } + else if (reqUrl.protocol === 'https:') { + reqPort = 443; + } + // Format the request hostname and hostname with port + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === 'number') { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + // Compare request host against noproxy + for (const upperNoProxyItem of noProxy + .split(',') + .map(x => x.trim().toUpperCase()) + .filter(x => x)) { + if (upperReqHosts.some(x => x === upperNoProxyItem)) { + return true; + } + } + return false; +} +exports.checkBypass = checkBypass; +//# sourceMappingURL=proxy.js.map + +/***/ }), + +/***/ 204: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _validate = _interopRequireDefault(__webpack_require__(634)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function parse(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + let v; + const arr = new Uint8Array(16); // Parse ########-....-....-....-............ + + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 0xff; + arr[2] = v >>> 8 & 0xff; + arr[3] = v & 0xff; // Parse ........-####-....-....-............ + + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 0xff; // Parse ........-....-####-....-............ + + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 0xff; // Parse ........-....-....-####-............ + + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 0xff; // Parse ........-....-....-....-############ + // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) + + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; + arr[11] = v / 0x100000000 & 0xff; + arr[12] = v >>> 24 & 0xff; + arr[13] = v >>> 16 & 0xff; + arr[14] = v >>> 8 & 0xff; + arr[15] = v & 0xff; + return arr; +} + +var _default = parse; +exports.default = _default; + /***/ }), /***/ 211: @@ -481,69 +815,77 @@ module.exports = require("https"); /***/ }), -/***/ 226: -/***/ (function(__unusedmodule, exports) { +/***/ 293: +/***/ (function(__unusedmodule, exports, __webpack_require__) { "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -class BasicCredentialHandler { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - options.headers['Authorization'] = - 'Basic ' + - Buffer.from(this.username + ':' + this.password).toString('base64'); - } - // This handler cannot handle 401 - canHandleAuthentication(response) { - return false; - } - handleAuthentication(httpClient, requestInfo, objs) { - return null; - } -} -exports.BasicCredentialHandler = BasicCredentialHandler; -class BearerCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - options.headers['Authorization'] = 'Bearer ' + this.token; - } - // This handler cannot handle 401 - canHandleAuthentication(response) { - return false; - } - handleAuthentication(httpClient, requestInfo, objs) { - return null; - } -} -exports.BearerCredentialHandler = BearerCredentialHandler; -class PersonalAccessTokenCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - options.headers['Authorization'] = - 'Basic ' + Buffer.from('PAT:' + this.token).toString('base64'); - } - // This handler cannot handle 401 - canHandleAuthentication(response) { - return false; - } - handleAuthentication(httpClient, requestInfo, objs) { - return null; - } -} -exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _rng = _interopRequireDefault(__webpack_require__(506)); + +var _stringify = _interopRequireDefault(__webpack_require__(960)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function v4(options, buf, offset) { + options = options || {}; + + const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + + + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; + } + + return buf; + } + + return (0, _stringify.default)(rnds); +} + +var _default = v4; +exports.default = _default; + +/***/ }), + +/***/ 329: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _crypto = _interopRequireDefault(__webpack_require__(417)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return _crypto.default.createHash('sha1').update(bytes).digest(); +} + +var _default = sha1; +exports.default = _default; /***/ }), @@ -560,6 +902,625 @@ module.exports = require("assert"); module.exports = __webpack_require__(141); +/***/ }), + +/***/ 417: +/***/ (function(module) { + +module.exports = require("crypto"); + +/***/ }), + +/***/ 425: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +/* eslint-disable @typescript-eslint/no-explicit-any */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (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.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +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()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; +const http = __importStar(__webpack_require__(605)); +const https = __importStar(__webpack_require__(211)); +const pm = __importStar(__webpack_require__(177)); +const tunnel = __importStar(__webpack_require__(413)); +var HttpCodes; +(function (HttpCodes) { + HttpCodes[HttpCodes["OK"] = 200] = "OK"; + HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; + HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; + HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; + HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; + HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; + HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; + HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; + HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; + HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; + HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; +})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); +var Headers; +(function (Headers) { + Headers["Accept"] = "accept"; + Headers["ContentType"] = "content-type"; +})(Headers = exports.Headers || (exports.Headers = {})); +var MediaTypes; +(function (MediaTypes) { + MediaTypes["ApplicationJson"] = "application/json"; +})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); +/** + * Returns the proxy URL, depending upon the supplied url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ +function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ''; +} +exports.getProxyUrl = getProxyUrl; +const HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect +]; +const HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout +]; +const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; +const ExponentialBackoffCeiling = 10; +const ExponentialBackoffTimeSlice = 5; +class HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = 'HttpClientError'; + this.statusCode = statusCode; + Object.setPrototypeOf(this, HttpClientError.prototype); + } +} +exports.HttpClientError = HttpClientError; +class HttpClientResponse { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on('data', (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on('end', () => { + resolve(output.toString()); + }); + })); + }); + } +} +exports.HttpClientResponse = HttpClientResponse; +function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === 'https:'; +} +exports.isHttps = isHttps; +class HttpClient { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('GET', requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('DELETE', requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('POST', requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('PATCH', requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('PUT', requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('HEAD', requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error('Client has already been disposed.'); + } + const parsedUrl = new URL(requestUrl); + let info = this._prepareRequest(verb, parsedUrl, headers); + // Only perform retries on reads since writes may not be idempotent. + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) + ? this._maxRetries + 1 + : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info, data); + // Check if it's an authentication challenge + if (response && + response.message && + response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info, data); + } + else { + // We have received an unauthorized response but have no handlers to handle it. + // Let the response return to the caller. + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && + HttpRedirectCodes.includes(response.message.statusCode) && + this._allowRedirects && + redirectsRemaining > 0) { + const redirectUrl = response.message.headers['location']; + if (!redirectUrl) { + // if there's no location to redirect to, we won't + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === 'https:' && + parsedUrl.protocol !== parsedRedirectUrl.protocol && + !this._allowRedirectDowngrade) { + throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); + } + // we need to finish reading the response before reassigning response + // which will leak the open socket. + yield response.readBody(); + // strip authorization header if redirected to a different hostname + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + // header names are case insensitive + if (header.toLowerCase() === 'authorization') { + delete headers[header]; + } + } + } + // let's make the request with the new redirectUrl + info = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info, data); + redirectsRemaining--; + } + if (!response.message.statusCode || + !HttpResponseRetryCodes.includes(response.message.statusCode)) { + // If not a retry code, return immediately instead of retrying + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info, data) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } + else if (!res) { + // If `err` is not passed, then `res` must be passed. + reject(new Error('Unknown error')); + } + else { + resolve(res); + } + } + this.requestRawWithCallback(info, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info, data, onResult) { + if (typeof data === 'string') { + if (!info.options.headers) { + info.options.headers = {}; + } + info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info.httpModule.request(info.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(undefined, res); + }); + let socket; + req.on('socket', sock => { + socket = sock; + }); + // If we ever get disconnected, we want the socket to timeout eventually + req.setTimeout(this._socketTimeout || 3 * 60000, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info.options.path}`)); + }); + req.on('error', function (err) { + // err has statusCode property + // res should have headers + handleResult(err); + }); + if (data && typeof data === 'string') { + req.write(data, 'utf8'); + } + if (data && typeof data !== 'string') { + data.on('close', function () { + req.end(); + }); + data.pipe(req); + } + else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info = {}; + info.parsedUrl = requestUrl; + const usingSsl = info.parsedUrl.protocol === 'https:'; + info.httpModule = usingSsl ? https : http; + const defaultPort = usingSsl ? 443 : 80; + info.options = {}; + info.options.host = info.parsedUrl.hostname; + info.options.port = info.parsedUrl.port + ? parseInt(info.parsedUrl.port) + : defaultPort; + info.options.path = + (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); + info.options.method = method; + info.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info.options.headers['user-agent'] = this.userAgent; + } + info.options.agent = this._getAgent(info.parsedUrl); + // gives handlers an opportunity to participate + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info.options); + } + } + return info; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (this._keepAlive && !useProxy) { + agent = this._agent; + } + // if agent is already assigned use that agent. + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === 'https:'; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis. + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + })), { host: proxyUrl.hostname, port: proxyUrl.port }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === 'https:'; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } + else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + // if reusing agent across request and tunneling agent isn't assigned create a new agent + if (this._keepAlive && !agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https.Agent(options) : new http.Agent(options); + this._agent = agent; + } + // if not using private agent and tunnel agent isn't setup then use global agent + if (!agent) { + agent = usingSsl ? https.globalAgent : http.globalAgent; + } + if (usingSsl && this._ignoreSslError) { + // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process + // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options + // we have to cast it to any and change it directly + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise(resolve => setTimeout(() => resolve(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + // not found leads to null obj returned + if (statusCode === HttpCodes.NotFound) { + resolve(response); + } + // get the result from the body + function dateTimeDeserializer(key, value) { + if (typeof value === 'string') { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } + else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } + catch (err) { + // Invalid resource (contents not json); leaving result obj null + } + // note that 3xx redirects are handled by the http layer. + if (statusCode > 299) { + let msg; + // if exception/error in body, attempt to get better error + if (obj && obj.message) { + msg = obj.message; + } + else if (contents && contents.length > 0) { + // it may be the case that the exception is in the body message as string + msg = contents; + } + else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } + else { + resolve(response); + } + })); + }); + } +} +exports.HttpClient = HttpClient; +const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); +//# sourceMappingURL=index.js.map + /***/ }), /***/ 431: @@ -701,6 +1662,7 @@ const file_command_1 = __webpack_require__(102); const utils_1 = __webpack_require__(82); const os = __importStar(__webpack_require__(87)); const path = __importStar(__webpack_require__(622)); +const uuid_1 = __webpack_require__(25); const oidc_utils_1 = __webpack_require__(742); /** * The code to exit an action @@ -730,7 +1692,14 @@ function exportVariable(name, val) { process.env[name] = convertedVal; const filePath = process.env['GITHUB_ENV'] || ''; if (filePath) { - const delimiter = '_GitHubActionsFileCommandDelimeter_'; + const delimiter = `ghadelimiter_${uuid_1.v4()}`; + // These should realistically never happen, but just in case someone finds a way to exploit uuid generation let's not allow keys or values that contain the delimiter. + if (name.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedVal.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`; file_command_1.issueCommand('ENV', commandValue); } @@ -976,552 +1945,246 @@ function getIDToken(aud) { }); } exports.getIDToken = getIDToken; +/** + * Summary exports + */ +var summary_1 = __webpack_require__(665); +Object.defineProperty(exports, "summary", { enumerable: true, get: function () { return summary_1.summary; } }); +/** + * @deprecated use core.summary + */ +var summary_2 = __webpack_require__(665); +Object.defineProperty(exports, "markdownSummary", { enumerable: true, get: function () { return summary_2.markdownSummary; } }); +/** + * Path exports + */ +var path_utils_1 = __webpack_require__(573); +Object.defineProperty(exports, "toPosixPath", { enumerable: true, get: function () { return path_utils_1.toPosixPath; } }); +Object.defineProperty(exports, "toWin32Path", { enumerable: true, get: function () { return path_utils_1.toWin32Path; } }); +Object.defineProperty(exports, "toPlatformPath", { enumerable: true, get: function () { return path_utils_1.toPlatformPath; } }); //# sourceMappingURL=core.js.map /***/ }), -/***/ 539: +/***/ 506: /***/ (function(__unusedmodule, exports, __webpack_require__) { "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const http = __webpack_require__(605); -const https = __webpack_require__(211); -const pm = __webpack_require__(950); -let tunnel; -var HttpCodes; -(function (HttpCodes) { - HttpCodes[HttpCodes["OK"] = 200] = "OK"; - HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; - HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; - HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; - HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; - HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; - HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; - HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; - HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; - HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; - HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; -})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); -var Headers; -(function (Headers) { - Headers["Accept"] = "accept"; - Headers["ContentType"] = "content-type"; -})(Headers = exports.Headers || (exports.Headers = {})); -var MediaTypes; -(function (MediaTypes) { - MediaTypes["ApplicationJson"] = "application/json"; -})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); -/** - * Returns the proxy URL, depending upon the supplied url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ -function getProxyUrl(serverUrl) { - let proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ''; -} -exports.getProxyUrl = getProxyUrl; -const HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect -]; -const HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout -]; -const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; -const ExponentialBackoffCeiling = 10; -const ExponentialBackoffTimeSlice = 5; -class HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = 'HttpClientError'; - this.statusCode = statusCode; - Object.setPrototypeOf(this, HttpClientError.prototype); - } -} -exports.HttpClientError = HttpClientError; -class HttpClientResponse { - constructor(message) { - this.message = message; - } - readBody() { - return new Promise(async (resolve, reject) => { - let output = Buffer.alloc(0); - this.message.on('data', (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on('end', () => { - resolve(output.toString()); - }); - }); - } -} -exports.HttpClientResponse = HttpClientResponse; -function isHttps(requestUrl) { - let parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === 'https:'; -} -exports.isHttps = isHttps; -class HttpClient { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); - } - get(requestUrl, additionalHeaders) { - return this.request('GET', requestUrl, null, additionalHeaders || {}); - } - del(requestUrl, additionalHeaders) { - return this.request('DELETE', requestUrl, null, additionalHeaders || {}); - } - post(requestUrl, data, additionalHeaders) { - return this.request('POST', requestUrl, data, additionalHeaders || {}); - } - patch(requestUrl, data, additionalHeaders) { - return this.request('PATCH', requestUrl, data, additionalHeaders || {}); - } - put(requestUrl, data, additionalHeaders) { - return this.request('PUT', requestUrl, data, additionalHeaders || {}); - } - head(requestUrl, additionalHeaders) { - return this.request('HEAD', requestUrl, null, additionalHeaders || {}); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return this.request(verb, requestUrl, stream, additionalHeaders); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - async getJson(requestUrl, additionalHeaders = {}) { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - let res = await this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - } - async postJson(requestUrl, obj, additionalHeaders = {}) { - let data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - let res = await this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - } - async putJson(requestUrl, obj, additionalHeaders = {}) { - let data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - let res = await this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - } - async patchJson(requestUrl, obj, additionalHeaders = {}) { - let data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - let res = await this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - async request(verb, requestUrl, data, headers) { - if (this._disposed) { - throw new Error('Client has already been disposed.'); - } - let parsedUrl = new URL(requestUrl); - let info = this._prepareRequest(verb, parsedUrl, headers); - // Only perform retries on reads since writes may not be idempotent. - let maxTries = this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1 - ? this._maxRetries + 1 - : 1; - let numTries = 0; - let response; - while (numTries < maxTries) { - response = await this.requestRaw(info, data); - // Check if it's an authentication challenge - if (response && - response.message && - response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (let i = 0; i < this.handlers.length; i++) { - if (this.handlers[i].canHandleAuthentication(response)) { - authenticationHandler = this.handlers[i]; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info, data); - } - else { - // We have received an unauthorized response but have no handlers to handle it. - // Let the response return to the caller. - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 && - this._allowRedirects && - redirectsRemaining > 0) { - const redirectUrl = response.message.headers['location']; - if (!redirectUrl) { - // if there's no location to redirect to, we won't - break; - } - let parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol == 'https:' && - parsedUrl.protocol != parsedRedirectUrl.protocol && - !this._allowRedirectDowngrade) { - throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); - } - // we need to finish reading the response before reassigning response - // which will leak the open socket. - await response.readBody(); - // strip authorization header if redirected to a different hostname - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (let header in headers) { - // header names are case insensitive - if (header.toLowerCase() === 'authorization') { - delete headers[header]; - } - } - } - // let's make the request with the new redirectUrl - info = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = await this.requestRaw(info, data); - redirectsRemaining--; - } - if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) { - // If not a retry code, return immediately instead of retrying - return response; - } - numTries += 1; - if (numTries < maxTries) { - await response.readBody(); - await this._performExponentialBackoff(numTries); - } - } - return response; - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info, data) { - return new Promise((resolve, reject) => { - let callbackForResult = function (err, res) { - if (err) { - reject(err); - } - resolve(res); - }; - this.requestRawWithCallback(info, data, callbackForResult); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info, data, onResult) { - let socket; - if (typeof data === 'string') { - info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); - } - let callbackCalled = false; - let handleResult = (err, res) => { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - }; - let req = info.httpModule.request(info.options, (msg) => { - let res = new HttpClientResponse(msg); - handleResult(null, res); - }); - req.on('socket', sock => { - socket = sock; - }); - // If we ever get disconnected, we want the socket to timeout eventually - req.setTimeout(this._socketTimeout || 3 * 60000, () => { - if (socket) { - socket.end(); - } - handleResult(new Error('Request timeout: ' + info.options.path), null); - }); - req.on('error', function (err) { - // err has statusCode property - // res should have headers - handleResult(err, null); - }); - if (data && typeof data === 'string') { - req.write(data, 'utf8'); - } - if (data && typeof data !== 'string') { - data.on('close', function () { - req.end(); - }); - data.pipe(req); - } - else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - let parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info = {}; - info.parsedUrl = requestUrl; - const usingSsl = info.parsedUrl.protocol === 'https:'; - info.httpModule = usingSsl ? https : http; - const defaultPort = usingSsl ? 443 : 80; - info.options = {}; - info.options.host = info.parsedUrl.hostname; - info.options.port = info.parsedUrl.port - ? parseInt(info.parsedUrl.port) - : defaultPort; - info.options.path = - (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); - info.options.method = method; - info.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info.options.headers['user-agent'] = this.userAgent; - } - info.options.agent = this._getAgent(info.parsedUrl); - // gives handlers an opportunity to participate - if (this.handlers) { - this.handlers.forEach(handler => { - handler.prepareRequest(info.options); - }); - } - return info; - } - _mergeHeaders(headers) { - const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers)); - } - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default) { - const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default; - } - _getAgent(parsedUrl) { - let agent; - let proxyUrl = pm.getProxyUrl(parsedUrl); - let useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (this._keepAlive && !useProxy) { - agent = this._agent; - } - // if agent is already assigned use that agent. - if (!!agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === 'https:'; - let maxSockets = 100; - if (!!this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (useProxy) { - // If using proxy, need tunnel - if (!tunnel) { - tunnel = __webpack_require__(413); - } - const agentOptions = { - maxSockets: maxSockets, - keepAlive: this._keepAlive, - proxy: { - ...((proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), - host: proxyUrl.hostname, - port: proxyUrl.port - } - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === 'https:'; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } - else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - // if reusing agent across request and tunneling agent isn't assigned create a new agent - if (this._keepAlive && !agent) { - const options = { keepAlive: this._keepAlive, maxSockets: maxSockets }; - agent = usingSsl ? new https.Agent(options) : new http.Agent(options); - this._agent = agent; - } - // if not using private agent and tunnel agent isn't setup then use global agent - if (!agent) { - agent = usingSsl ? https.globalAgent : http.globalAgent; - } - if (usingSsl && this._ignoreSslError) { - // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process - // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options - // we have to cast it to any and change it directly - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _performExponentialBackoff(retryNumber) { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise(resolve => setTimeout(() => resolve(), ms)); - } - static dateTimeDeserializer(key, value) { - if (typeof value === 'string') { - let a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - async _processResponse(res, options) { - return new Promise(async (resolve, reject) => { - const statusCode = res.message.statusCode; - const response = { - statusCode: statusCode, - result: null, - headers: {} - }; - // not found leads to null obj returned - if (statusCode == HttpCodes.NotFound) { - resolve(response); - } - let obj; - let contents; - // get the result from the body - try { - contents = await res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, HttpClient.dateTimeDeserializer); - } - else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } - catch (err) { - // Invalid resource (contents not json); leaving result obj null - } - // note that 3xx redirects are handled by the http layer. - if (statusCode > 299) { - let msg; - // if exception/error in body, attempt to get better error - if (obj && obj.message) { - msg = obj.message; - } - else if (contents && contents.length > 0) { - // it may be the case that the exception is in the body message as string - msg = contents; - } - else { - msg = 'Failed request: (' + statusCode + ')'; - } - let err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } - else { - resolve(response); - } - }); - } -} -exports.HttpClient = HttpClient; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = rng; + +var _crypto = _interopRequireDefault(__webpack_require__(417)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate + +let poolPtr = rnds8Pool.length; + +function rng() { + if (poolPtr > rnds8Pool.length - 16) { + _crypto.default.randomFillSync(rnds8Pool); + + poolPtr = 0; + } + + return rnds8Pool.slice(poolPtr, poolPtr += 16); +} + +/***/ }), + +/***/ 525: +/***/ (function(__unusedmodule, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; +exports.default = _default; + +/***/ }), + +/***/ 554: +/***/ (function(__unusedmodule, 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()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; +class BasicCredentialHandler { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.BasicCredentialHandler = BasicCredentialHandler; +class BearerCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.BearerCredentialHandler = BearerCredentialHandler; +class PersonalAccessTokenCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; +//# sourceMappingURL=auth.js.map + +/***/ }), + +/***/ 572: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _v = _interopRequireDefault(__webpack_require__(136)); + +var _md = _interopRequireDefault(__webpack_require__(659)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const v3 = (0, _v.default)('v3', 0x30, _md.default); +var _default = v3; +exports.default = _default; + +/***/ }), + +/***/ 573: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (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.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; +const path = __importStar(__webpack_require__(622)); +/** + * toPosixPath converts the given path to the posix form. On Windows, \\ will be + * replaced with /. + * + * @param pth. Path to transform. + * @return string Posix path. + */ +function toPosixPath(pth) { + return pth.replace(/[\\]/g, '/'); +} +exports.toPosixPath = toPosixPath; +/** + * toWin32Path converts the given path to the win32 form. On Linux, / will be + * replaced with \\. + * + * @param pth. Path to transform. + * @return string Win32 path. + */ +function toWin32Path(pth) { + return pth.replace(/[/]/g, '\\'); +} +exports.toWin32Path = toWin32Path; +/** + * toPlatformPath converts the given path to a platform-specific path. It does + * this by replacing instances of / and \ with the platform-specific path + * separator. + * + * @param pth The path to platformize. + * @return string The platform-specific path. + */ +function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path.sep); +} +exports.toPlatformPath = toPlatformPath; +//# sourceMappingURL=path-utils.js.map /***/ }), @@ -1553,6 +2216,373 @@ module.exports = require("net"); /***/ }), +/***/ 634: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _regex = _interopRequireDefault(__webpack_require__(525)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function validate(uuid) { + return typeof uuid === 'string' && _regex.default.test(uuid); +} + +var _default = validate; +exports.default = _default; + +/***/ }), + +/***/ 638: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _v = _interopRequireDefault(__webpack_require__(136)); + +var _sha = _interopRequireDefault(__webpack_require__(329)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const v5 = (0, _v.default)('v5', 0x50, _sha.default); +var _default = v5; +exports.default = _default; + +/***/ }), + +/***/ 659: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _crypto = _interopRequireDefault(__webpack_require__(417)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return _crypto.default.createHash('md5').update(bytes).digest(); +} + +var _default = md5; +exports.default = _default; + +/***/ }), + +/***/ 665: +/***/ (function(__unusedmodule, exports, __webpack_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()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; +const os_1 = __webpack_require__(87); +const fs_1 = __webpack_require__(747); +const { access, appendFile, writeFile } = fs_1.promises; +exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'; +exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary'; +class Summary { + constructor() { + this._buffer = ''; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } + catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs) + .map(([key, value]) => ` ${key}="${value}"`) + .join(''); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: 'utf8' }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ''; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, (lang && { lang })); + const element = this.wrap('pre', this.wrap('code', code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? 'ol' : 'ul'; + const listItems = items.map(item => this.wrap('li', item)).join(''); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows + .map(row => { + const cells = row + .map(cell => { + if (typeof cell === 'string') { + return this.wrap('td', cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? 'th' : 'td'; + const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan })); + return this.wrap(tag, data, attrs); + }) + .join(''); + return this.wrap('tr', cells); + }) + .join(''); + const element = this.wrap('table', tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap('details', this.wrap('summary', label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height })); + const element = this.wrap('img', null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag) + ? tag + : 'h1'; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap('hr', null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap('br', null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, (cite && { cite })); + const element = this.wrap('blockquote', text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap('a', text, { href }); + return this.addRaw(element).addEOL(); + } +} +const _summary = new Summary(); +/** + * @deprecated use `core.summary` + */ +exports.markdownSummary = _summary; +exports.summary = _summary; +//# sourceMappingURL=summary.js.map + +/***/ }), + /***/ 669: /***/ (function(module) { @@ -1576,8 +2606,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", { value: true }); exports.OidcClient = void 0; -const http_client_1 = __webpack_require__(539); -const auth_1 = __webpack_require__(226); +const http_client_1 = __webpack_require__(425); +const auth_1 = __webpack_require__(554); const core_1 = __webpack_require__(470); class OidcClient { static createHttpClient(allowRetry = true, maxRetry = 10) { @@ -1651,68 +2681,163 @@ module.exports = require("fs"); /***/ }), -/***/ 950: -/***/ (function(__unusedmodule, exports) { +/***/ 810: +/***/ (function(__unusedmodule, exports, __webpack_require__) { "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function getProxyUrl(reqUrl) { - let usingSsl = reqUrl.protocol === 'https:'; - let proxyUrl; - if (checkBypass(reqUrl)) { - return proxyUrl; - } - let proxyVar; - if (usingSsl) { - proxyVar = process.env['https_proxy'] || process.env['HTTPS_PROXY']; - } - else { - proxyVar = process.env['http_proxy'] || process.env['HTTP_PROXY']; - } - if (proxyVar) { - proxyUrl = new URL(proxyVar); - } - return proxyUrl; -} -exports.getProxyUrl = getProxyUrl; -function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - let noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; - if (!noProxy) { - return false; - } - // Determine the request port - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } - else if (reqUrl.protocol === 'http:') { - reqPort = 80; - } - else if (reqUrl.protocol === 'https:') { - reqPort = 443; - } - // Format the request hostname and hostname with port - let upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === 'number') { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - // Compare request host against noproxy - for (let upperNoProxyItem of noProxy - .split(',') - .map(x => x.trim().toUpperCase()) - .filter(x => x)) { - if (upperReqHosts.some(x => x === upperNoProxyItem)) { - return true; - } - } - return false; -} -exports.checkBypass = checkBypass; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _rng = _interopRequireDefault(__webpack_require__(506)); + +var _stringify = _interopRequireDefault(__webpack_require__(960)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html +let _nodeId; + +let _clockseq; // Previous uuid creation time + + +let _lastMSecs = 0; +let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details + +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || _rng.default)(); + + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } + + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + + + let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + + let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) + + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression + + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + + + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } // Per 4.2.1.2 Throw error if too many uuids are requested + + + if (nsecs >= 10000) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + + msecs += 12219292800000; // `time_low` + + const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; // `time_mid` + + const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; // `time_high_and_version` + + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + + b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + + b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` + + b[i++] = clockseq & 0xff; // `node` + + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf || (0, _stringify.default)(b); +} + +var _default = v1; +exports.default = _default; + +/***/ }), + +/***/ 960: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _validate = _interopRequireDefault(__webpack_require__(634)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +const byteToHex = []; + +for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 0x100).toString(16).substr(1)); +} + +function stringify(arr, offset = 0) { + // Note: Be careful editing this code! It's been tuned for performance + // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 + const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one + // of the following: + // - One or more input array values don't map to a hex octet (leading to + // "undefined" in the uuid) + // - Invalid input values for the RFC `version` or `variant` fields + + if (!(0, _validate.default)(uuid)) { + throw TypeError('Stringified UUID is invalid'); + } + + return uuid; +} + +var _default = stringify; +exports.default = _default; /***/ }) diff --git a/dist/index.js b/dist/index.js index f389722..a04541a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4247,7 +4247,7 @@ AWS.CodeStarconnections = Service.defineService('codestarconnections', ['2019-12 Object.defineProperty(apiLoader.services['codestarconnections'], '2019-12-01', { get: function get() { var model = __webpack_require__(4664); - model.paginators = __webpack_require__(7572).pagination; + model.paginators = __webpack_require__(6052).pagination; return model; }, enumerable: true, @@ -4287,6 +4287,91 @@ module.exports = {"version":"2.0","metadata":{"apiVersion":"2016-11-23","endpoin /***/ }), +/***/ 1136: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +exports.URL = exports.DNS = void 0; + +var _stringify = _interopRequireDefault(__webpack_require__(1960)); + +var _parse = _interopRequireDefault(__webpack_require__(3204)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + + const bytes = []; + + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + + return bytes; +} + +const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; +exports.DNS = DNS; +const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; +exports.URL = URL; + +function _default(name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + if (typeof value === 'string') { + value = stringToBytes(value); + } + + if (typeof namespace === 'string') { + namespace = (0, _parse.default)(namespace); + } + + if (namespace.length !== 16) { + throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); + } // Compute hash of namespace and value, Per 4.3 + // Future: Use spread syntax when supported on all platforms, e.g. `bytes = + // hashfunc([...namespace, ... value])` + + + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 0x0f | version; + bytes[8] = bytes[8] & 0x3f | 0x80; + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + + return buf; + } + + return (0, _stringify.default)(bytes); + } // Function#name is not settable on some platforms (#270) + + + try { + generateUUID.name = name; // eslint-disable-next-line no-empty + } catch (err) {} // For CommonJS default export support + + + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; +} + +/***/ }), + /***/ 1152: /***/ (function(module) { @@ -5863,6 +5948,21 @@ module.exports = {"pagination":{"ListCloudFrontOriginAccessIdentities":{"input_t /***/ }), +/***/ 1525: +/***/ (function(__unusedmodule, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; +exports.default = _default; + +/***/ }), + /***/ 1527: /***/ (function(module) { @@ -7226,6 +7326,120 @@ module.exports = {"version":"2.0","metadata":{"apiVersion":"2019-06-10","endpoin /***/ }), +/***/ 1810: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _rng = _interopRequireDefault(__webpack_require__(6506)); + +var _stringify = _interopRequireDefault(__webpack_require__(1960)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html +let _nodeId; + +let _clockseq; // Previous uuid creation time + + +let _lastMSecs = 0; +let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details + +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || _rng.default)(); + + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } + + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + + + let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + + let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) + + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression + + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + + + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } // Per 4.2.1.2 Throw error if too many uuids are requested + + + if (nsecs >= 10000) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + + msecs += 12219292800000; // `time_low` + + const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; // `time_mid` + + const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; // `time_high_and_version` + + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + + b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + + b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` + + b[i++] = clockseq & 0xff; // `node` + + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf || (0, _stringify.default)(b); +} + +var _default = v1; +exports.default = _default; + +/***/ }), + /***/ 1818: /***/ (function(module, __unusedexports, __webpack_require__) { @@ -7976,6 +8190,52 @@ module.exports = {"pagination":{"ListClusters":{"input_token":"NextToken","outpu /***/ }), +/***/ 1960: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _validate = _interopRequireDefault(__webpack_require__(6634)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +const byteToHex = []; + +for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 0x100).toString(16).substr(1)); +} + +function stringify(arr, offset = 0) { + // Note: Be careful editing this code! It's been tuned for performance + // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 + const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one + // of the following: + // - One or more input array values don't map to a hex octet (leading to + // "undefined" in the uuid) + // - Invalid input values for the RFC `version` or `variant` fields + + if (!(0, _validate.default)(uuid)) { + throw TypeError('Stringified UUID is invalid'); + } + + return uuid; +} + +var _default = stringify; +exports.default = _default; + +/***/ }), + /***/ 1965: /***/ (function(module) { @@ -8284,13 +8544,6 @@ module.exports = require("os"); /***/ }), -/***/ 2091: -/***/ (function(module) { - -module.exports = {"version":"2.0","metadata":{"apiVersion":"2018-08-20","endpointPrefix":"s3-control","protocol":"rest-xml","serviceFullName":"AWS S3 Control","serviceId":"S3 Control","signatureVersion":"s3v4","signingName":"s3","uid":"s3control-2018-08-20"},"operations":{"CreateAccessPoint":{"http":{"method":"PUT","requestUri":"/v20180820/accesspoint/{name}"},"input":{"locationName":"CreateAccessPointRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","Name","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"},"Bucket":{},"VpcConfiguration":{"shape":"S5"},"PublicAccessBlockConfiguration":{"shape":"S7"}}},"output":{"type":"structure","members":{"AccessPointArn":{},"Alias":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"CreateAccessPointForObjectLambda":{"http":{"method":"PUT","requestUri":"/v20180820/accesspointforobjectlambda/{name}"},"input":{"locationName":"CreateAccessPointForObjectLambdaRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","Name","Configuration"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"},"Configuration":{"shape":"Se"}}},"output":{"type":"structure","members":{"ObjectLambdaAccessPointArn":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"CreateBucket":{"http":{"method":"PUT","requestUri":"/v20180820/bucket/{name}"},"input":{"type":"structure","required":["Bucket"],"members":{"ACL":{"location":"header","locationName":"x-amz-acl"},"Bucket":{"location":"uri","locationName":"name"},"CreateBucketConfiguration":{"locationName":"CreateBucketConfiguration","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","members":{"LocationConstraint":{}}},"GrantFullControl":{"location":"header","locationName":"x-amz-grant-full-control"},"GrantRead":{"location":"header","locationName":"x-amz-grant-read"},"GrantReadACP":{"location":"header","locationName":"x-amz-grant-read-acp"},"GrantWrite":{"location":"header","locationName":"x-amz-grant-write"},"GrantWriteACP":{"location":"header","locationName":"x-amz-grant-write-acp"},"ObjectLockEnabledForBucket":{"location":"header","locationName":"x-amz-bucket-object-lock-enabled","type":"boolean"},"OutpostId":{"location":"header","locationName":"x-amz-outpost-id"}},"payload":"CreateBucketConfiguration"},"output":{"type":"structure","members":{"Location":{"location":"header","locationName":"Location"},"BucketArn":{}}},"httpChecksumRequired":true},"CreateJob":{"http":{"requestUri":"/v20180820/jobs"},"input":{"locationName":"CreateJobRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","Operation","Report","ClientRequestToken","Priority","RoleArn"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"ConfirmationRequired":{"type":"boolean"},"Operation":{"shape":"S19"},"Report":{"shape":"S2g"},"ClientRequestToken":{"idempotencyToken":true},"Manifest":{"shape":"S2k"},"Description":{},"Priority":{"type":"integer"},"RoleArn":{},"Tags":{"shape":"S1r"},"ManifestGenerator":{"shape":"S2v"}}},"output":{"type":"structure","members":{"JobId":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"CreateMultiRegionAccessPoint":{"http":{"requestUri":"/v20180820/async-requests/mrap/create"},"input":{"locationName":"CreateMultiRegionAccessPointRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","ClientToken","Details"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"ClientToken":{"idempotencyToken":true},"Details":{"shape":"S3b"}}},"output":{"type":"structure","members":{"RequestTokenARN":{}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"DeleteAccessPoint":{"http":{"method":"DELETE","requestUri":"/v20180820/accesspoint/{name}"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteAccessPointForObjectLambda":{"http":{"method":"DELETE","requestUri":"/v20180820/accesspointforobjectlambda/{name}"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteAccessPointPolicy":{"http":{"method":"DELETE","requestUri":"/v20180820/accesspoint/{name}/policy"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteAccessPointPolicyForObjectLambda":{"http":{"method":"DELETE","requestUri":"/v20180820/accesspointforobjectlambda/{name}/policy"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteBucket":{"http":{"method":"DELETE","requestUri":"/v20180820/bucket/{name}"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteBucketLifecycleConfiguration":{"http":{"method":"DELETE","requestUri":"/v20180820/bucket/{name}/lifecycleconfiguration"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteBucketPolicy":{"http":{"method":"DELETE","requestUri":"/v20180820/bucket/{name}/policy"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteBucketTagging":{"http":{"method":"DELETE","requestUri":"/v20180820/bucket/{name}/tagging","responseCode":204},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteJobTagging":{"http":{"method":"DELETE","requestUri":"/v20180820/jobs/{id}/tagging"},"input":{"type":"structure","required":["AccountId","JobId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"JobId":{"location":"uri","locationName":"id"}}},"output":{"type":"structure","members":{}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteMultiRegionAccessPoint":{"http":{"requestUri":"/v20180820/async-requests/mrap/delete"},"input":{"locationName":"DeleteMultiRegionAccessPointRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","ClientToken","Details"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"ClientToken":{"idempotencyToken":true},"Details":{"shape":"S3s"}}},"output":{"type":"structure","members":{"RequestTokenARN":{}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"DeletePublicAccessBlock":{"http":{"method":"DELETE","requestUri":"/v20180820/configuration/publicAccessBlock"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteStorageLensConfiguration":{"http":{"method":"DELETE","requestUri":"/v20180820/storagelens/{storagelensid}"},"input":{"type":"structure","required":["ConfigId","AccountId"],"members":{"ConfigId":{"location":"uri","locationName":"storagelensid"},"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteStorageLensConfigurationTagging":{"http":{"method":"DELETE","requestUri":"/v20180820/storagelens/{storagelensid}/tagging"},"input":{"type":"structure","required":["ConfigId","AccountId"],"members":{"ConfigId":{"location":"uri","locationName":"storagelensid"},"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"}}},"output":{"type":"structure","members":{}},"endpoint":{"hostPrefix":"{AccountId}."}},"DescribeJob":{"http":{"method":"GET","requestUri":"/v20180820/jobs/{id}"},"input":{"type":"structure","required":["AccountId","JobId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"JobId":{"location":"uri","locationName":"id"}}},"output":{"type":"structure","members":{"Job":{"type":"structure","members":{"JobId":{},"ConfirmationRequired":{"type":"boolean"},"Description":{},"JobArn":{},"Status":{},"Manifest":{"shape":"S2k"},"Operation":{"shape":"S19"},"Priority":{"type":"integer"},"ProgressSummary":{"shape":"S44"},"StatusUpdateReason":{},"FailureReasons":{"type":"list","member":{"type":"structure","members":{"FailureCode":{},"FailureReason":{}}}},"Report":{"shape":"S2g"},"CreationTime":{"type":"timestamp"},"TerminationDate":{"type":"timestamp"},"RoleArn":{},"SuspendedDate":{"type":"timestamp"},"SuspendedCause":{},"ManifestGenerator":{"shape":"S2v"},"GeneratedManifestDescriptor":{"type":"structure","members":{"Format":{},"Location":{"shape":"S2p"}}}}}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DescribeMultiRegionAccessPointOperation":{"http":{"method":"GET","requestUri":"/v20180820/async-requests/mrap/{request_token+}"},"input":{"type":"structure","required":["AccountId","RequestTokenARN"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"RequestTokenARN":{"location":"uri","locationName":"request_token"}}},"output":{"type":"structure","members":{"AsyncOperation":{"type":"structure","members":{"CreationTime":{"type":"timestamp"},"Operation":{},"RequestTokenARN":{},"RequestParameters":{"type":"structure","members":{"CreateMultiRegionAccessPointRequest":{"shape":"S3b"},"DeleteMultiRegionAccessPointRequest":{"shape":"S3s"},"PutMultiRegionAccessPointPolicyRequest":{"shape":"S4q"}}},"RequestStatus":{},"ResponseDetails":{"type":"structure","members":{"MultiRegionAccessPointDetails":{"type":"structure","members":{"Regions":{"type":"list","member":{"locationName":"Region","type":"structure","members":{"Name":{},"RequestStatus":{}}}}}},"ErrorDetails":{"type":"structure","members":{"Code":{},"Message":{},"Resource":{},"RequestId":{}}}}}}}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"GetAccessPoint":{"http":{"method":"GET","requestUri":"/v20180820/accesspoint/{name}"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Name":{},"Bucket":{},"NetworkOrigin":{},"VpcConfiguration":{"shape":"S5"},"PublicAccessBlockConfiguration":{"shape":"S7"},"CreationDate":{"type":"timestamp"},"Alias":{},"AccessPointArn":{},"Endpoints":{"type":"map","key":{},"value":{}}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetAccessPointConfigurationForObjectLambda":{"http":{"method":"GET","requestUri":"/v20180820/accesspointforobjectlambda/{name}/configuration"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Configuration":{"shape":"Se"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetAccessPointForObjectLambda":{"http":{"method":"GET","requestUri":"/v20180820/accesspointforobjectlambda/{name}"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Name":{},"PublicAccessBlockConfiguration":{"shape":"S7"},"CreationDate":{"type":"timestamp"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetAccessPointPolicy":{"http":{"method":"GET","requestUri":"/v20180820/accesspoint/{name}/policy"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Policy":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetAccessPointPolicyForObjectLambda":{"http":{"method":"GET","requestUri":"/v20180820/accesspointforobjectlambda/{name}/policy"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Policy":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetAccessPointPolicyStatus":{"http":{"method":"GET","requestUri":"/v20180820/accesspoint/{name}/policyStatus"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"PolicyStatus":{"shape":"S5f"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetAccessPointPolicyStatusForObjectLambda":{"http":{"method":"GET","requestUri":"/v20180820/accesspointforobjectlambda/{name}/policyStatus"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"PolicyStatus":{"shape":"S5f"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetBucket":{"http":{"method":"GET","requestUri":"/v20180820/bucket/{name}"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Bucket":{},"PublicAccessBlockEnabled":{"type":"boolean"},"CreationDate":{"type":"timestamp"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetBucketLifecycleConfiguration":{"http":{"method":"GET","requestUri":"/v20180820/bucket/{name}/lifecycleconfiguration"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Rules":{"shape":"S5o"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetBucketPolicy":{"http":{"method":"GET","requestUri":"/v20180820/bucket/{name}/policy"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Policy":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetBucketTagging":{"http":{"method":"GET","requestUri":"/v20180820/bucket/{name}/tagging"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","required":["TagSet"],"members":{"TagSet":{"shape":"S1r"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetJobTagging":{"http":{"method":"GET","requestUri":"/v20180820/jobs/{id}/tagging"},"input":{"type":"structure","required":["AccountId","JobId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"JobId":{"location":"uri","locationName":"id"}}},"output":{"type":"structure","members":{"Tags":{"shape":"S1r"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetMultiRegionAccessPoint":{"http":{"method":"GET","requestUri":"/v20180820/mrap/instances/{name}"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"AccessPoint":{"shape":"S6f"}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"GetMultiRegionAccessPointPolicy":{"http":{"method":"GET","requestUri":"/v20180820/mrap/instances/{name}/policy"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Policy":{"type":"structure","members":{"Established":{"type":"structure","members":{"Policy":{}}},"Proposed":{"type":"structure","members":{"Policy":{}}}}}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"GetMultiRegionAccessPointPolicyStatus":{"http":{"method":"GET","requestUri":"/v20180820/mrap/instances/{name}/policystatus"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Established":{"shape":"S5f"}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"GetPublicAccessBlock":{"http":{"method":"GET","requestUri":"/v20180820/configuration/publicAccessBlock"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"}}},"output":{"type":"structure","members":{"PublicAccessBlockConfiguration":{"shape":"S7"}},"payload":"PublicAccessBlockConfiguration"},"endpoint":{"hostPrefix":"{AccountId}."}},"GetStorageLensConfiguration":{"http":{"method":"GET","requestUri":"/v20180820/storagelens/{storagelensid}"},"input":{"type":"structure","required":["ConfigId","AccountId"],"members":{"ConfigId":{"location":"uri","locationName":"storagelensid"},"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"}}},"output":{"type":"structure","members":{"StorageLensConfiguration":{"shape":"S6w"}},"payload":"StorageLensConfiguration"},"endpoint":{"hostPrefix":"{AccountId}."}},"GetStorageLensConfigurationTagging":{"http":{"method":"GET","requestUri":"/v20180820/storagelens/{storagelensid}/tagging"},"input":{"type":"structure","required":["ConfigId","AccountId"],"members":{"ConfigId":{"location":"uri","locationName":"storagelensid"},"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"}}},"output":{"type":"structure","members":{"Tags":{"shape":"S7q"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"ListAccessPoints":{"http":{"method":"GET","requestUri":"/v20180820/accesspoint"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"querystring","locationName":"bucket"},"NextToken":{"location":"querystring","locationName":"nextToken"},"MaxResults":{"location":"querystring","locationName":"maxResults","type":"integer"}}},"output":{"type":"structure","members":{"AccessPointList":{"type":"list","member":{"locationName":"AccessPoint","type":"structure","required":["Name","NetworkOrigin","Bucket"],"members":{"Name":{},"NetworkOrigin":{},"VpcConfiguration":{"shape":"S5"},"Bucket":{},"AccessPointArn":{},"Alias":{}}}},"NextToken":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"ListAccessPointsForObjectLambda":{"http":{"method":"GET","requestUri":"/v20180820/accesspointforobjectlambda"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"NextToken":{"location":"querystring","locationName":"nextToken"},"MaxResults":{"location":"querystring","locationName":"maxResults","type":"integer"}}},"output":{"type":"structure","members":{"ObjectLambdaAccessPointList":{"type":"list","member":{"locationName":"ObjectLambdaAccessPoint","type":"structure","required":["Name"],"members":{"Name":{},"ObjectLambdaAccessPointArn":{}}}},"NextToken":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"ListJobs":{"http":{"method":"GET","requestUri":"/v20180820/jobs"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"JobStatuses":{"location":"querystring","locationName":"jobStatuses","type":"list","member":{}},"NextToken":{"location":"querystring","locationName":"nextToken"},"MaxResults":{"location":"querystring","locationName":"maxResults","type":"integer"}}},"output":{"type":"structure","members":{"NextToken":{},"Jobs":{"type":"list","member":{"type":"structure","members":{"JobId":{},"Description":{},"Operation":{},"Priority":{"type":"integer"},"Status":{},"CreationTime":{"type":"timestamp"},"TerminationDate":{"type":"timestamp"},"ProgressSummary":{"shape":"S44"}}}}}},"endpoint":{"hostPrefix":"{AccountId}."}},"ListMultiRegionAccessPoints":{"http":{"method":"GET","requestUri":"/v20180820/mrap/instances"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"NextToken":{"location":"querystring","locationName":"nextToken"},"MaxResults":{"location":"querystring","locationName":"maxResults","type":"integer"}}},"output":{"type":"structure","members":{"AccessPoints":{"type":"list","member":{"shape":"S6f","locationName":"AccessPoint"}},"NextToken":{}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"ListRegionalBuckets":{"http":{"method":"GET","requestUri":"/v20180820/bucket"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"NextToken":{"location":"querystring","locationName":"nextToken"},"MaxResults":{"location":"querystring","locationName":"maxResults","type":"integer"},"OutpostId":{"location":"header","locationName":"x-amz-outpost-id"}}},"output":{"type":"structure","members":{"RegionalBucketList":{"type":"list","member":{"locationName":"RegionalBucket","type":"structure","required":["Bucket","PublicAccessBlockEnabled","CreationDate"],"members":{"Bucket":{},"BucketArn":{},"PublicAccessBlockEnabled":{"type":"boolean"},"CreationDate":{"type":"timestamp"},"OutpostId":{}}}},"NextToken":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"ListStorageLensConfigurations":{"http":{"method":"GET","requestUri":"/v20180820/storagelens"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"NextToken":{"location":"querystring","locationName":"nextToken"}}},"output":{"type":"structure","members":{"NextToken":{},"StorageLensConfigurationList":{"type":"list","member":{"locationName":"StorageLensConfiguration","type":"structure","required":["Id","StorageLensArn","HomeRegion"],"members":{"Id":{},"StorageLensArn":{},"HomeRegion":{},"IsEnabled":{"type":"boolean"}}},"flattened":true}}},"endpoint":{"hostPrefix":"{AccountId}."}},"PutAccessPointConfigurationForObjectLambda":{"http":{"method":"PUT","requestUri":"/v20180820/accesspointforobjectlambda/{name}/configuration"},"input":{"locationName":"PutAccessPointConfigurationForObjectLambdaRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","Name","Configuration"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"},"Configuration":{"shape":"Se"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"PutAccessPointPolicy":{"http":{"method":"PUT","requestUri":"/v20180820/accesspoint/{name}/policy"},"input":{"locationName":"PutAccessPointPolicyRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","Name","Policy"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"},"Policy":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"PutAccessPointPolicyForObjectLambda":{"http":{"method":"PUT","requestUri":"/v20180820/accesspointforobjectlambda/{name}/policy"},"input":{"locationName":"PutAccessPointPolicyForObjectLambdaRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","Name","Policy"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"},"Policy":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"PutBucketLifecycleConfiguration":{"http":{"method":"PUT","requestUri":"/v20180820/bucket/{name}/lifecycleconfiguration"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"},"LifecycleConfiguration":{"locationName":"LifecycleConfiguration","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","members":{"Rules":{"shape":"S5o"}}}},"payload":"LifecycleConfiguration"},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"PutBucketPolicy":{"http":{"method":"PUT","requestUri":"/v20180820/bucket/{name}/policy"},"input":{"locationName":"PutBucketPolicyRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","Bucket","Policy"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"},"ConfirmRemoveSelfBucketAccess":{"location":"header","locationName":"x-amz-confirm-remove-self-bucket-access","type":"boolean"},"Policy":{}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"PutBucketTagging":{"http":{"method":"PUT","requestUri":"/v20180820/bucket/{name}/tagging"},"input":{"type":"structure","required":["AccountId","Bucket","Tagging"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"},"Tagging":{"locationName":"Tagging","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["TagSet"],"members":{"TagSet":{"shape":"S1r"}}}},"payload":"Tagging"},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"PutJobTagging":{"http":{"method":"PUT","requestUri":"/v20180820/jobs/{id}/tagging"},"input":{"locationName":"PutJobTaggingRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","JobId","Tags"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"JobId":{"location":"uri","locationName":"id"},"Tags":{"shape":"S1r"}}},"output":{"type":"structure","members":{}},"endpoint":{"hostPrefix":"{AccountId}."}},"PutMultiRegionAccessPointPolicy":{"http":{"requestUri":"/v20180820/async-requests/mrap/put-policy"},"input":{"locationName":"PutMultiRegionAccessPointPolicyRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","ClientToken","Details"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"ClientToken":{"idempotencyToken":true},"Details":{"shape":"S4q"}}},"output":{"type":"structure","members":{"RequestTokenARN":{}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"PutPublicAccessBlock":{"http":{"method":"PUT","requestUri":"/v20180820/configuration/publicAccessBlock"},"input":{"type":"structure","required":["PublicAccessBlockConfiguration","AccountId"],"members":{"PublicAccessBlockConfiguration":{"shape":"S7","locationName":"PublicAccessBlockConfiguration","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"}},"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"}},"payload":"PublicAccessBlockConfiguration"},"endpoint":{"hostPrefix":"{AccountId}."}},"PutStorageLensConfiguration":{"http":{"method":"PUT","requestUri":"/v20180820/storagelens/{storagelensid}"},"input":{"locationName":"PutStorageLensConfigurationRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["ConfigId","AccountId","StorageLensConfiguration"],"members":{"ConfigId":{"location":"uri","locationName":"storagelensid"},"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"StorageLensConfiguration":{"shape":"S6w"},"Tags":{"shape":"S7q"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"PutStorageLensConfigurationTagging":{"http":{"method":"PUT","requestUri":"/v20180820/storagelens/{storagelensid}/tagging"},"input":{"locationName":"PutStorageLensConfigurationTaggingRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["ConfigId","AccountId","Tags"],"members":{"ConfigId":{"location":"uri","locationName":"storagelensid"},"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Tags":{"shape":"S7q"}}},"output":{"type":"structure","members":{}},"endpoint":{"hostPrefix":"{AccountId}."}},"UpdateJobPriority":{"http":{"requestUri":"/v20180820/jobs/{id}/priority"},"input":{"type":"structure","required":["AccountId","JobId","Priority"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"JobId":{"location":"uri","locationName":"id"},"Priority":{"location":"querystring","locationName":"priority","type":"integer"}}},"output":{"type":"structure","required":["JobId","Priority"],"members":{"JobId":{},"Priority":{"type":"integer"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"UpdateJobStatus":{"http":{"requestUri":"/v20180820/jobs/{id}/status"},"input":{"type":"structure","required":["AccountId","JobId","RequestedJobStatus"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"JobId":{"location":"uri","locationName":"id"},"RequestedJobStatus":{"location":"querystring","locationName":"requestedJobStatus"},"StatusUpdateReason":{"location":"querystring","locationName":"statusUpdateReason"}}},"output":{"type":"structure","members":{"JobId":{},"Status":{},"StatusUpdateReason":{}}},"endpoint":{"hostPrefix":"{AccountId}."}}},"shapes":{"S5":{"type":"structure","required":["VpcId"],"members":{"VpcId":{}}},"S7":{"type":"structure","members":{"BlockPublicAcls":{"locationName":"BlockPublicAcls","type":"boolean"},"IgnorePublicAcls":{"locationName":"IgnorePublicAcls","type":"boolean"},"BlockPublicPolicy":{"locationName":"BlockPublicPolicy","type":"boolean"},"RestrictPublicBuckets":{"locationName":"RestrictPublicBuckets","type":"boolean"}}},"Se":{"type":"structure","required":["SupportingAccessPoint","TransformationConfigurations"],"members":{"SupportingAccessPoint":{},"CloudWatchMetricsEnabled":{"type":"boolean"},"AllowedFeatures":{"type":"list","member":{"locationName":"AllowedFeature"}},"TransformationConfigurations":{"type":"list","member":{"locationName":"TransformationConfiguration","type":"structure","required":["Actions","ContentTransformation"],"members":{"Actions":{"type":"list","member":{"locationName":"Action"}},"ContentTransformation":{"type":"structure","members":{"AwsLambda":{"type":"structure","required":["FunctionArn"],"members":{"FunctionArn":{},"FunctionPayload":{}}}},"union":true}}}}}},"S19":{"type":"structure","members":{"LambdaInvoke":{"type":"structure","members":{"FunctionArn":{}}},"S3PutObjectCopy":{"type":"structure","members":{"TargetResource":{},"CannedAccessControlList":{},"AccessControlGrants":{"shape":"S1e"},"MetadataDirective":{},"ModifiedSinceConstraint":{"type":"timestamp"},"NewObjectMetadata":{"type":"structure","members":{"CacheControl":{},"ContentDisposition":{},"ContentEncoding":{},"ContentLanguage":{},"UserMetadata":{"type":"map","key":{},"value":{}},"ContentLength":{"type":"long"},"ContentMD5":{},"ContentType":{},"HttpExpiresDate":{"type":"timestamp"},"RequesterCharged":{"type":"boolean"},"SSEAlgorithm":{}}},"NewObjectTagging":{"shape":"S1r"},"RedirectLocation":{},"RequesterPays":{"type":"boolean"},"StorageClass":{},"UnModifiedSinceConstraint":{"type":"timestamp"},"SSEAwsKmsKeyId":{},"TargetKeyPrefix":{},"ObjectLockLegalHoldStatus":{},"ObjectLockMode":{},"ObjectLockRetainUntilDate":{"type":"timestamp"},"BucketKeyEnabled":{"type":"boolean"},"ChecksumAlgorithm":{}}},"S3PutObjectAcl":{"type":"structure","members":{"AccessControlPolicy":{"type":"structure","members":{"AccessControlList":{"type":"structure","required":["Owner"],"members":{"Owner":{"type":"structure","members":{"ID":{},"DisplayName":{}}},"Grants":{"shape":"S1e"}}},"CannedAccessControlList":{}}}}},"S3PutObjectTagging":{"type":"structure","members":{"TagSet":{"shape":"S1r"}}},"S3DeleteObjectTagging":{"type":"structure","members":{}},"S3InitiateRestoreObject":{"type":"structure","members":{"ExpirationInDays":{"type":"integer"},"GlacierJobTier":{}}},"S3PutObjectLegalHold":{"type":"structure","required":["LegalHold"],"members":{"LegalHold":{"type":"structure","required":["Status"],"members":{"Status":{}}}}},"S3PutObjectRetention":{"type":"structure","required":["Retention"],"members":{"BypassGovernanceRetention":{"type":"boolean"},"Retention":{"type":"structure","members":{"RetainUntilDate":{"type":"timestamp"},"Mode":{}}}}},"S3ReplicateObject":{"type":"structure","members":{}}}},"S1e":{"type":"list","member":{"type":"structure","members":{"Grantee":{"type":"structure","members":{"TypeIdentifier":{},"Identifier":{},"DisplayName":{}}},"Permission":{}}}},"S1r":{"type":"list","member":{"shape":"S1s"}},"S1s":{"type":"structure","required":["Key","Value"],"members":{"Key":{},"Value":{}}},"S2g":{"type":"structure","required":["Enabled"],"members":{"Bucket":{},"Format":{},"Enabled":{"type":"boolean"},"Prefix":{},"ReportScope":{}}},"S2k":{"type":"structure","required":["Spec","Location"],"members":{"Spec":{"type":"structure","required":["Format"],"members":{"Format":{},"Fields":{"type":"list","member":{}}}},"Location":{"shape":"S2p"}}},"S2p":{"type":"structure","required":["ObjectArn","ETag"],"members":{"ObjectArn":{},"ObjectVersionId":{},"ETag":{}}},"S2v":{"type":"structure","members":{"S3JobManifestGenerator":{"type":"structure","required":["SourceBucket","EnableManifestOutput"],"members":{"ExpectedBucketOwner":{},"SourceBucket":{},"ManifestOutputLocation":{"type":"structure","required":["Bucket","ManifestFormat"],"members":{"ExpectedManifestBucketOwner":{},"Bucket":{},"ManifestPrefix":{},"ManifestEncryption":{"type":"structure","members":{"SSES3":{"locationName":"SSE-S3","type":"structure","members":{}},"SSEKMS":{"locationName":"SSE-KMS","type":"structure","required":["KeyId"],"members":{"KeyId":{}}}}},"ManifestFormat":{}}},"Filter":{"type":"structure","members":{"EligibleForReplication":{"type":"boolean"},"CreatedAfter":{"type":"timestamp"},"CreatedBefore":{"type":"timestamp"},"ObjectReplicationStatuses":{"type":"list","member":{}}}},"EnableManifestOutput":{"type":"boolean"}}}},"union":true},"S3b":{"type":"structure","required":["Name","Regions"],"members":{"Name":{},"PublicAccessBlock":{"shape":"S7"},"Regions":{"type":"list","member":{"locationName":"Region","type":"structure","required":["Bucket"],"members":{"Bucket":{}}}}}},"S3s":{"type":"structure","required":["Name"],"members":{"Name":{}}},"S44":{"type":"structure","members":{"TotalNumberOfTasks":{"type":"long"},"NumberOfTasksSucceeded":{"type":"long"},"NumberOfTasksFailed":{"type":"long"},"Timers":{"type":"structure","members":{"ElapsedTimeInActiveSeconds":{"type":"long"}}}}},"S4q":{"type":"structure","required":["Name","Policy"],"members":{"Name":{},"Policy":{}}},"S5f":{"type":"structure","members":{"IsPublic":{"locationName":"IsPublic","type":"boolean"}}},"S5o":{"type":"list","member":{"locationName":"Rule","type":"structure","required":["Status"],"members":{"Expiration":{"type":"structure","members":{"Date":{"type":"timestamp"},"Days":{"type":"integer"},"ExpiredObjectDeleteMarker":{"type":"boolean"}}},"ID":{},"Filter":{"type":"structure","members":{"Prefix":{},"Tag":{"shape":"S1s"},"And":{"type":"structure","members":{"Prefix":{},"Tags":{"shape":"S1r"}}}}},"Status":{},"Transitions":{"type":"list","member":{"locationName":"Transition","type":"structure","members":{"Date":{"type":"timestamp"},"Days":{"type":"integer"},"StorageClass":{}}}},"NoncurrentVersionTransitions":{"type":"list","member":{"locationName":"NoncurrentVersionTransition","type":"structure","members":{"NoncurrentDays":{"type":"integer"},"StorageClass":{}}}},"NoncurrentVersionExpiration":{"type":"structure","members":{"NoncurrentDays":{"type":"integer"}}},"AbortIncompleteMultipartUpload":{"type":"structure","members":{"DaysAfterInitiation":{"type":"integer"}}}}}},"S6f":{"type":"structure","members":{"Name":{},"Alias":{},"CreatedAt":{"type":"timestamp"},"PublicAccessBlock":{"shape":"S7"},"Status":{},"Regions":{"type":"list","member":{"locationName":"Region","type":"structure","members":{"Bucket":{},"Region":{}}}}}},"S6w":{"type":"structure","required":["Id","AccountLevel","IsEnabled"],"members":{"Id":{},"AccountLevel":{"type":"structure","required":["BucketLevel"],"members":{"ActivityMetrics":{"shape":"S6y"},"BucketLevel":{"type":"structure","members":{"ActivityMetrics":{"shape":"S6y"},"PrefixLevel":{"type":"structure","required":["StorageMetrics"],"members":{"StorageMetrics":{"type":"structure","members":{"IsEnabled":{"type":"boolean"},"SelectionCriteria":{"type":"structure","members":{"Delimiter":{},"MaxDepth":{"type":"integer"},"MinStorageBytesPercentage":{"type":"double"}}}}}}}}}}},"Include":{"type":"structure","members":{"Buckets":{"shape":"S78"},"Regions":{"shape":"S79"}}},"Exclude":{"type":"structure","members":{"Buckets":{"shape":"S78"},"Regions":{"shape":"S79"}}},"DataExport":{"type":"structure","members":{"S3BucketDestination":{"type":"structure","required":["Format","OutputSchemaVersion","AccountId","Arn"],"members":{"Format":{},"OutputSchemaVersion":{},"AccountId":{},"Arn":{},"Prefix":{},"Encryption":{"type":"structure","members":{"SSES3":{"locationName":"SSE-S3","type":"structure","members":{}},"SSEKMS":{"locationName":"SSE-KMS","type":"structure","required":["KeyId"],"members":{"KeyId":{}}}}}}},"CloudWatchMetrics":{"type":"structure","required":["IsEnabled"],"members":{"IsEnabled":{"type":"boolean"}}}}},"IsEnabled":{"type":"boolean"},"AwsOrg":{"type":"structure","required":["Arn"],"members":{"Arn":{}}},"StorageLensArn":{}}},"S6y":{"type":"structure","members":{"IsEnabled":{"type":"boolean"}}},"S78":{"type":"list","member":{"locationName":"Arn"}},"S79":{"type":"list","member":{"locationName":"Region"}},"S7q":{"type":"list","member":{"locationName":"Tag","type":"structure","required":["Key","Value"],"members":{"Key":{},"Value":{}}}}}}; - -/***/ }), - /***/ 2102: /***/ (function(__unusedmodule, exports, __webpack_require__) { @@ -8411,6 +8664,34 @@ module.exports = {"pagination":{"ListEnvironmentAccountConnections":{"input_toke /***/ }), +/***/ 2135: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _validate = _interopRequireDefault(__webpack_require__(6634)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function version(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + return parseInt(uuid.substr(14, 1), 16); +} + +var _default = version; +exports.default = _default; + +/***/ }), + /***/ 2141: /***/ (function(module) { @@ -8830,6 +9111,618 @@ module.exports = {"pagination":{"ListGatewayRoutes":{"input_token":"nextToken"," /***/ }), +/***/ 2425: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +/* eslint-disable @typescript-eslint/no-explicit-any */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (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.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +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()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; +const http = __importStar(__webpack_require__(8605)); +const https = __importStar(__webpack_require__(7211)); +const pm = __importStar(__webpack_require__(4177)); +const tunnel = __importStar(__webpack_require__(7413)); +var HttpCodes; +(function (HttpCodes) { + HttpCodes[HttpCodes["OK"] = 200] = "OK"; + HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; + HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; + HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; + HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; + HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; + HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; + HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; + HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; + HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; + HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; +})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); +var Headers; +(function (Headers) { + Headers["Accept"] = "accept"; + Headers["ContentType"] = "content-type"; +})(Headers = exports.Headers || (exports.Headers = {})); +var MediaTypes; +(function (MediaTypes) { + MediaTypes["ApplicationJson"] = "application/json"; +})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); +/** + * Returns the proxy URL, depending upon the supplied url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ +function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ''; +} +exports.getProxyUrl = getProxyUrl; +const HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect +]; +const HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout +]; +const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; +const ExponentialBackoffCeiling = 10; +const ExponentialBackoffTimeSlice = 5; +class HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = 'HttpClientError'; + this.statusCode = statusCode; + Object.setPrototypeOf(this, HttpClientError.prototype); + } +} +exports.HttpClientError = HttpClientError; +class HttpClientResponse { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on('data', (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on('end', () => { + resolve(output.toString()); + }); + })); + }); + } +} +exports.HttpClientResponse = HttpClientResponse; +function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === 'https:'; +} +exports.isHttps = isHttps; +class HttpClient { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('GET', requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('DELETE', requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('POST', requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('PATCH', requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('PUT', requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('HEAD', requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error('Client has already been disposed.'); + } + const parsedUrl = new URL(requestUrl); + let info = this._prepareRequest(verb, parsedUrl, headers); + // Only perform retries on reads since writes may not be idempotent. + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) + ? this._maxRetries + 1 + : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info, data); + // Check if it's an authentication challenge + if (response && + response.message && + response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info, data); + } + else { + // We have received an unauthorized response but have no handlers to handle it. + // Let the response return to the caller. + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && + HttpRedirectCodes.includes(response.message.statusCode) && + this._allowRedirects && + redirectsRemaining > 0) { + const redirectUrl = response.message.headers['location']; + if (!redirectUrl) { + // if there's no location to redirect to, we won't + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === 'https:' && + parsedUrl.protocol !== parsedRedirectUrl.protocol && + !this._allowRedirectDowngrade) { + throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); + } + // we need to finish reading the response before reassigning response + // which will leak the open socket. + yield response.readBody(); + // strip authorization header if redirected to a different hostname + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + // header names are case insensitive + if (header.toLowerCase() === 'authorization') { + delete headers[header]; + } + } + } + // let's make the request with the new redirectUrl + info = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info, data); + redirectsRemaining--; + } + if (!response.message.statusCode || + !HttpResponseRetryCodes.includes(response.message.statusCode)) { + // If not a retry code, return immediately instead of retrying + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info, data) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } + else if (!res) { + // If `err` is not passed, then `res` must be passed. + reject(new Error('Unknown error')); + } + else { + resolve(res); + } + } + this.requestRawWithCallback(info, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info, data, onResult) { + if (typeof data === 'string') { + if (!info.options.headers) { + info.options.headers = {}; + } + info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info.httpModule.request(info.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(undefined, res); + }); + let socket; + req.on('socket', sock => { + socket = sock; + }); + // If we ever get disconnected, we want the socket to timeout eventually + req.setTimeout(this._socketTimeout || 3 * 60000, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info.options.path}`)); + }); + req.on('error', function (err) { + // err has statusCode property + // res should have headers + handleResult(err); + }); + if (data && typeof data === 'string') { + req.write(data, 'utf8'); + } + if (data && typeof data !== 'string') { + data.on('close', function () { + req.end(); + }); + data.pipe(req); + } + else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info = {}; + info.parsedUrl = requestUrl; + const usingSsl = info.parsedUrl.protocol === 'https:'; + info.httpModule = usingSsl ? https : http; + const defaultPort = usingSsl ? 443 : 80; + info.options = {}; + info.options.host = info.parsedUrl.hostname; + info.options.port = info.parsedUrl.port + ? parseInt(info.parsedUrl.port) + : defaultPort; + info.options.path = + (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); + info.options.method = method; + info.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info.options.headers['user-agent'] = this.userAgent; + } + info.options.agent = this._getAgent(info.parsedUrl); + // gives handlers an opportunity to participate + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info.options); + } + } + return info; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (this._keepAlive && !useProxy) { + agent = this._agent; + } + // if agent is already assigned use that agent. + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === 'https:'; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis. + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + })), { host: proxyUrl.hostname, port: proxyUrl.port }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === 'https:'; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } + else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + // if reusing agent across request and tunneling agent isn't assigned create a new agent + if (this._keepAlive && !agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https.Agent(options) : new http.Agent(options); + this._agent = agent; + } + // if not using private agent and tunnel agent isn't setup then use global agent + if (!agent) { + agent = usingSsl ? https.globalAgent : http.globalAgent; + } + if (usingSsl && this._ignoreSslError) { + // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process + // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options + // we have to cast it to any and change it directly + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise(resolve => setTimeout(() => resolve(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + // not found leads to null obj returned + if (statusCode === HttpCodes.NotFound) { + resolve(response); + } + // get the result from the body + function dateTimeDeserializer(key, value) { + if (typeof value === 'string') { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } + else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } + catch (err) { + // Invalid resource (contents not json); leaving result obj null + } + // note that 3xx redirects are handled by the http layer. + if (statusCode > 299) { + let msg; + // if exception/error in body, attempt to get better error + if (obj && obj.message) { + msg = obj.message; + } + else if (contents && contents.length > 0) { + // it may be the case that the exception is in the body message as string + msg = contents; + } + else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } + else { + resolve(response); + } + })); + }); + } +} +exports.HttpClient = HttpClient; +const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); +//# sourceMappingURL=index.js.map + +/***/ }), + /***/ 2447: /***/ (function(module, __unusedexports, __webpack_require__) { @@ -10470,7 +11363,7 @@ AWS.S3Control = Service.defineService('s3control', ['2018-08-20']); __webpack_require__(1489); Object.defineProperty(apiLoader.services['s3control'], '2018-08-20', { get: function get() { - var model = __webpack_require__(2091); + var model = __webpack_require__(6539); model.paginators = __webpack_require__(2592).pagination; return model; }, @@ -13307,71 +14200,6 @@ module.exports = {"version":"2.0","metadata":{"apiVersion":"2020-07-01","endpoin module.exports = {"metadata":{"apiVersion":"2018-05-14","endpointPrefix":"devices.iot1click","signingName":"iot1click","serviceFullName":"AWS IoT 1-Click Devices Service","serviceId":"IoT 1Click Devices Service","protocol":"rest-json","jsonVersion":"1.1","uid":"devices-2018-05-14","signatureVersion":"v4"},"operations":{"ClaimDevicesByClaimCode":{"http":{"method":"PUT","requestUri":"/claims/{claimCode}","responseCode":200},"input":{"type":"structure","members":{"ClaimCode":{"location":"uri","locationName":"claimCode"}},"required":["ClaimCode"]},"output":{"type":"structure","members":{"ClaimCode":{"locationName":"claimCode"},"Total":{"locationName":"total","type":"integer"}}}},"DescribeDevice":{"http":{"method":"GET","requestUri":"/devices/{deviceId}","responseCode":200},"input":{"type":"structure","members":{"DeviceId":{"location":"uri","locationName":"deviceId"}},"required":["DeviceId"]},"output":{"type":"structure","members":{"DeviceDescription":{"shape":"S8","locationName":"deviceDescription"}}}},"FinalizeDeviceClaim":{"http":{"method":"PUT","requestUri":"/devices/{deviceId}/finalize-claim","responseCode":200},"input":{"type":"structure","members":{"DeviceId":{"location":"uri","locationName":"deviceId"},"Tags":{"shape":"Sc","locationName":"tags"}},"required":["DeviceId"]},"output":{"type":"structure","members":{"State":{"locationName":"state"}}}},"GetDeviceMethods":{"http":{"method":"GET","requestUri":"/devices/{deviceId}/methods","responseCode":200},"input":{"type":"structure","members":{"DeviceId":{"location":"uri","locationName":"deviceId"}},"required":["DeviceId"]},"output":{"type":"structure","members":{"DeviceMethods":{"locationName":"deviceMethods","type":"list","member":{"shape":"Si"}}}}},"InitiateDeviceClaim":{"http":{"method":"PUT","requestUri":"/devices/{deviceId}/initiate-claim","responseCode":200},"input":{"type":"structure","members":{"DeviceId":{"location":"uri","locationName":"deviceId"}},"required":["DeviceId"]},"output":{"type":"structure","members":{"State":{"locationName":"state"}}}},"InvokeDeviceMethod":{"http":{"requestUri":"/devices/{deviceId}/methods","responseCode":200},"input":{"type":"structure","members":{"DeviceId":{"location":"uri","locationName":"deviceId"},"DeviceMethod":{"shape":"Si","locationName":"deviceMethod"},"DeviceMethodParameters":{"locationName":"deviceMethodParameters"}},"required":["DeviceId"]},"output":{"type":"structure","members":{"DeviceMethodResponse":{"locationName":"deviceMethodResponse"}}}},"ListDeviceEvents":{"http":{"method":"GET","requestUri":"/devices/{deviceId}/events","responseCode":200},"input":{"type":"structure","members":{"DeviceId":{"location":"uri","locationName":"deviceId"},"FromTimeStamp":{"shape":"So","location":"querystring","locationName":"fromTimeStamp"},"MaxResults":{"location":"querystring","locationName":"maxResults","type":"integer"},"NextToken":{"location":"querystring","locationName":"nextToken"},"ToTimeStamp":{"shape":"So","location":"querystring","locationName":"toTimeStamp"}},"required":["DeviceId","FromTimeStamp","ToTimeStamp"]},"output":{"type":"structure","members":{"Events":{"locationName":"events","type":"list","member":{"type":"structure","members":{"Device":{"locationName":"device","type":"structure","members":{"Attributes":{"locationName":"attributes","type":"structure","members":{}},"DeviceId":{"locationName":"deviceId"},"Type":{"locationName":"type"}}},"StdEvent":{"locationName":"stdEvent"}}}},"NextToken":{"locationName":"nextToken"}}}},"ListDevices":{"http":{"method":"GET","requestUri":"/devices","responseCode":200},"input":{"type":"structure","members":{"DeviceType":{"location":"querystring","locationName":"deviceType"},"MaxResults":{"location":"querystring","locationName":"maxResults","type":"integer"},"NextToken":{"location":"querystring","locationName":"nextToken"}}},"output":{"type":"structure","members":{"Devices":{"locationName":"devices","type":"list","member":{"shape":"S8"}},"NextToken":{"locationName":"nextToken"}}}},"ListTagsForResource":{"http":{"method":"GET","requestUri":"/tags/{resource-arn}","responseCode":200},"input":{"type":"structure","members":{"ResourceArn":{"location":"uri","locationName":"resource-arn"}},"required":["ResourceArn"]},"output":{"type":"structure","members":{"Tags":{"shape":"Sc","locationName":"tags"}}}},"TagResource":{"http":{"requestUri":"/tags/{resource-arn}","responseCode":204},"input":{"type":"structure","members":{"ResourceArn":{"location":"uri","locationName":"resource-arn"},"Tags":{"shape":"Sc","locationName":"tags"}},"required":["ResourceArn","Tags"]}},"UnclaimDevice":{"http":{"method":"PUT","requestUri":"/devices/{deviceId}/unclaim","responseCode":200},"input":{"type":"structure","members":{"DeviceId":{"location":"uri","locationName":"deviceId"}},"required":["DeviceId"]},"output":{"type":"structure","members":{"State":{"locationName":"state"}}}},"UntagResource":{"http":{"method":"DELETE","requestUri":"/tags/{resource-arn}","responseCode":204},"input":{"type":"structure","members":{"ResourceArn":{"location":"uri","locationName":"resource-arn"},"TagKeys":{"location":"querystring","locationName":"tagKeys","type":"list","member":{}}},"required":["TagKeys","ResourceArn"]}},"UpdateDeviceState":{"http":{"method":"PUT","requestUri":"/devices/{deviceId}/state","responseCode":200},"input":{"type":"structure","members":{"DeviceId":{"location":"uri","locationName":"deviceId"},"Enabled":{"locationName":"enabled","type":"boolean"}},"required":["DeviceId"]},"output":{"type":"structure","members":{}}}},"shapes":{"S8":{"type":"structure","members":{"Arn":{"locationName":"arn"},"Attributes":{"locationName":"attributes","type":"map","key":{},"value":{}},"DeviceId":{"locationName":"deviceId"},"Enabled":{"locationName":"enabled","type":"boolean"},"RemainingLife":{"locationName":"remainingLife","type":"double"},"Type":{"locationName":"type"},"Tags":{"shape":"Sc","locationName":"tags"}}},"Sc":{"type":"map","key":{},"value":{}},"Si":{"type":"structure","members":{"DeviceType":{"locationName":"deviceType"},"MethodName":{"locationName":"methodName"}}},"So":{"type":"timestamp","timestampFormat":"iso8601"}}}; -/***/ }), - -/***/ 2950: -/***/ (function(__unusedmodule, exports) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -function getProxyUrl(reqUrl) { - let usingSsl = reqUrl.protocol === 'https:'; - let proxyUrl; - if (checkBypass(reqUrl)) { - return proxyUrl; - } - let proxyVar; - if (usingSsl) { - proxyVar = process.env['https_proxy'] || process.env['HTTPS_PROXY']; - } - else { - proxyVar = process.env['http_proxy'] || process.env['HTTP_PROXY']; - } - if (proxyVar) { - proxyUrl = new URL(proxyVar); - } - return proxyUrl; -} -exports.getProxyUrl = getProxyUrl; -function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - let noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; - if (!noProxy) { - return false; - } - // Determine the request port - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } - else if (reqUrl.protocol === 'http:') { - reqPort = 80; - } - else if (reqUrl.protocol === 'https:') { - reqPort = 443; - } - // Format the request hostname and hostname with port - let upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === 'number') { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - // Compare request host against noproxy - for (let upperNoProxyItem of noProxy - .split(',') - .map(x => x.trim().toUpperCase()) - .filter(x => x)) { - if (upperReqHosts.some(x => x === upperNoProxyItem)) { - return true; - } - } - return false; -} -exports.checkBypass = checkBypass; - - /***/ }), /***/ 2966: @@ -14604,6 +15432,58 @@ module.exports = {"version":"2.0","metadata":{"apiVersion":"2021-11-29","endpoin /***/ }), +/***/ 3204: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _validate = _interopRequireDefault(__webpack_require__(6634)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function parse(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + let v; + const arr = new Uint8Array(16); // Parse ########-....-....-....-............ + + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 0xff; + arr[2] = v >>> 8 & 0xff; + arr[3] = v & 0xff; // Parse ........-####-....-....-............ + + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 0xff; // Parse ........-....-####-....-............ + + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 0xff; // Parse ........-....-....-####-............ + + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 0xff; // Parse ........-....-....-....-############ + // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) + + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; + arr[11] = v / 0x100000000 & 0xff; + arr[12] = v >>> 24 & 0xff; + arr[13] = v >>> 16 & 0xff; + arr[14] = v >>> 8 & 0xff; + arr[15] = v & 0xff; + return arr; +} + +var _default = parse; +exports.default = _default; + +/***/ }), + /***/ 3206: /***/ (function(module, __unusedexports, __webpack_require__) { @@ -14723,72 +15603,6 @@ module.exports = AWS.Textract; module.exports = {"version":"2.0","metadata":{"apiVersion":"2014-11-01","endpointPrefix":"kms","jsonVersion":"1.1","protocol":"json","serviceAbbreviation":"KMS","serviceFullName":"AWS Key Management Service","serviceId":"KMS","signatureVersion":"v4","targetPrefix":"TrentService","uid":"kms-2014-11-01"},"operations":{"CancelKeyDeletion":{"input":{"type":"structure","required":["KeyId"],"members":{"KeyId":{}}},"output":{"type":"structure","members":{"KeyId":{}}}},"ConnectCustomKeyStore":{"input":{"type":"structure","required":["CustomKeyStoreId"],"members":{"CustomKeyStoreId":{}}},"output":{"type":"structure","members":{}}},"CreateAlias":{"input":{"type":"structure","required":["AliasName","TargetKeyId"],"members":{"AliasName":{},"TargetKeyId":{}}}},"CreateCustomKeyStore":{"input":{"type":"structure","required":["CustomKeyStoreName","CloudHsmClusterId","TrustAnchorCertificate","KeyStorePassword"],"members":{"CustomKeyStoreName":{},"CloudHsmClusterId":{},"TrustAnchorCertificate":{},"KeyStorePassword":{"shape":"Sd"}}},"output":{"type":"structure","members":{"CustomKeyStoreId":{}}}},"CreateGrant":{"input":{"type":"structure","required":["KeyId","GranteePrincipal","Operations"],"members":{"KeyId":{},"GranteePrincipal":{},"RetiringPrincipal":{},"Operations":{"shape":"Sh"},"Constraints":{"shape":"Sj"},"GrantTokens":{"shape":"Sn"},"Name":{}}},"output":{"type":"structure","members":{"GrantToken":{},"GrantId":{}}}},"CreateKey":{"input":{"type":"structure","members":{"Policy":{},"Description":{},"KeyUsage":{},"CustomerMasterKeySpec":{"shape":"Sw","deprecated":true,"deprecatedMessage":"This parameter has been deprecated. Instead, use the KeySpec parameter."},"KeySpec":{},"Origin":{},"CustomKeyStoreId":{},"BypassPolicyLockoutSafetyCheck":{"type":"boolean"},"Tags":{"shape":"S10"},"MultiRegion":{"type":"boolean"}}},"output":{"type":"structure","members":{"KeyMetadata":{"shape":"S16"}}}},"Decrypt":{"input":{"type":"structure","required":["CiphertextBlob"],"members":{"CiphertextBlob":{"type":"blob"},"EncryptionContext":{"shape":"Sk"},"GrantTokens":{"shape":"Sn"},"KeyId":{},"EncryptionAlgorithm":{}}},"output":{"type":"structure","members":{"KeyId":{},"Plaintext":{"shape":"S1q"},"EncryptionAlgorithm":{}}}},"DeleteAlias":{"input":{"type":"structure","required":["AliasName"],"members":{"AliasName":{}}}},"DeleteCustomKeyStore":{"input":{"type":"structure","required":["CustomKeyStoreId"],"members":{"CustomKeyStoreId":{}}},"output":{"type":"structure","members":{}}},"DeleteImportedKeyMaterial":{"input":{"type":"structure","required":["KeyId"],"members":{"KeyId":{}}}},"DescribeCustomKeyStores":{"input":{"type":"structure","members":{"CustomKeyStoreId":{},"CustomKeyStoreName":{},"Limit":{"type":"integer"},"Marker":{}}},"output":{"type":"structure","members":{"CustomKeyStores":{"type":"list","member":{"type":"structure","members":{"CustomKeyStoreId":{},"CustomKeyStoreName":{},"CloudHsmClusterId":{},"TrustAnchorCertificate":{},"ConnectionState":{},"ConnectionErrorCode":{},"CreationDate":{"type":"timestamp"}}}},"NextMarker":{},"Truncated":{"type":"boolean"}}}},"DescribeKey":{"input":{"type":"structure","required":["KeyId"],"members":{"KeyId":{},"GrantTokens":{"shape":"Sn"}}},"output":{"type":"structure","members":{"KeyMetadata":{"shape":"S16"}}}},"DisableKey":{"input":{"type":"structure","required":["KeyId"],"members":{"KeyId":{}}}},"DisableKeyRotation":{"input":{"type":"structure","required":["KeyId"],"members":{"KeyId":{}}}},"DisconnectCustomKeyStore":{"input":{"type":"structure","required":["CustomKeyStoreId"],"members":{"CustomKeyStoreId":{}}},"output":{"type":"structure","members":{}}},"EnableKey":{"input":{"type":"structure","required":["KeyId"],"members":{"KeyId":{}}}},"EnableKeyRotation":{"input":{"type":"structure","required":["KeyId"],"members":{"KeyId":{}}}},"Encrypt":{"input":{"type":"structure","required":["KeyId","Plaintext"],"members":{"KeyId":{},"Plaintext":{"shape":"S1q"},"EncryptionContext":{"shape":"Sk"},"GrantTokens":{"shape":"Sn"},"EncryptionAlgorithm":{}}},"output":{"type":"structure","members":{"CiphertextBlob":{"type":"blob"},"KeyId":{},"EncryptionAlgorithm":{}}}},"GenerateDataKey":{"input":{"type":"structure","required":["KeyId"],"members":{"KeyId":{},"EncryptionContext":{"shape":"Sk"},"NumberOfBytes":{"type":"integer"},"KeySpec":{},"GrantTokens":{"shape":"Sn"}}},"output":{"type":"structure","members":{"CiphertextBlob":{"type":"blob"},"Plaintext":{"shape":"S1q"},"KeyId":{}}}},"GenerateDataKeyPair":{"input":{"type":"structure","required":["KeyId","KeyPairSpec"],"members":{"EncryptionContext":{"shape":"Sk"},"KeyId":{},"KeyPairSpec":{},"GrantTokens":{"shape":"Sn"}}},"output":{"type":"structure","members":{"PrivateKeyCiphertextBlob":{"type":"blob"},"PrivateKeyPlaintext":{"shape":"S1q"},"PublicKey":{"type":"blob"},"KeyId":{},"KeyPairSpec":{}}}},"GenerateDataKeyPairWithoutPlaintext":{"input":{"type":"structure","required":["KeyId","KeyPairSpec"],"members":{"EncryptionContext":{"shape":"Sk"},"KeyId":{},"KeyPairSpec":{},"GrantTokens":{"shape":"Sn"}}},"output":{"type":"structure","members":{"PrivateKeyCiphertextBlob":{"type":"blob"},"PublicKey":{"type":"blob"},"KeyId":{},"KeyPairSpec":{}}}},"GenerateDataKeyWithoutPlaintext":{"input":{"type":"structure","required":["KeyId"],"members":{"KeyId":{},"EncryptionContext":{"shape":"Sk"},"KeySpec":{},"NumberOfBytes":{"type":"integer"},"GrantTokens":{"shape":"Sn"}}},"output":{"type":"structure","members":{"CiphertextBlob":{"type":"blob"},"KeyId":{}}}},"GenerateRandom":{"input":{"type":"structure","members":{"NumberOfBytes":{"type":"integer"},"CustomKeyStoreId":{}}},"output":{"type":"structure","members":{"Plaintext":{"shape":"S1q"}}}},"GetKeyPolicy":{"input":{"type":"structure","required":["KeyId","PolicyName"],"members":{"KeyId":{},"PolicyName":{}}},"output":{"type":"structure","members":{"Policy":{}}}},"GetKeyRotationStatus":{"input":{"type":"structure","required":["KeyId"],"members":{"KeyId":{}}},"output":{"type":"structure","members":{"KeyRotationEnabled":{"type":"boolean"}}}},"GetParametersForImport":{"input":{"type":"structure","required":["KeyId","WrappingAlgorithm","WrappingKeySpec"],"members":{"KeyId":{},"WrappingAlgorithm":{},"WrappingKeySpec":{}}},"output":{"type":"structure","members":{"KeyId":{},"ImportToken":{"type":"blob"},"PublicKey":{"shape":"S1q"},"ParametersValidTo":{"type":"timestamp"}}}},"GetPublicKey":{"input":{"type":"structure","required":["KeyId"],"members":{"KeyId":{},"GrantTokens":{"shape":"Sn"}}},"output":{"type":"structure","members":{"KeyId":{},"PublicKey":{"type":"blob"},"CustomerMasterKeySpec":{"shape":"Sw","deprecated":true,"deprecatedMessage":"This field has been deprecated. Instead, use the KeySpec field."},"KeySpec":{},"KeyUsage":{},"EncryptionAlgorithms":{"shape":"S1d"},"SigningAlgorithms":{"shape":"S1f"}}}},"ImportKeyMaterial":{"input":{"type":"structure","required":["KeyId","ImportToken","EncryptedKeyMaterial"],"members":{"KeyId":{},"ImportToken":{"type":"blob"},"EncryptedKeyMaterial":{"type":"blob"},"ValidTo":{"type":"timestamp"},"ExpirationModel":{}}},"output":{"type":"structure","members":{}}},"ListAliases":{"input":{"type":"structure","members":{"KeyId":{},"Limit":{"type":"integer"},"Marker":{}}},"output":{"type":"structure","members":{"Aliases":{"type":"list","member":{"type":"structure","members":{"AliasName":{},"AliasArn":{},"TargetKeyId":{},"CreationDate":{"type":"timestamp"},"LastUpdatedDate":{"type":"timestamp"}}}},"NextMarker":{},"Truncated":{"type":"boolean"}}}},"ListGrants":{"input":{"type":"structure","required":["KeyId"],"members":{"Limit":{"type":"integer"},"Marker":{},"KeyId":{},"GrantId":{},"GranteePrincipal":{}}},"output":{"shape":"S39"}},"ListKeyPolicies":{"input":{"type":"structure","required":["KeyId"],"members":{"KeyId":{},"Limit":{"type":"integer"},"Marker":{}}},"output":{"type":"structure","members":{"PolicyNames":{"type":"list","member":{}},"NextMarker":{},"Truncated":{"type":"boolean"}}}},"ListKeys":{"input":{"type":"structure","members":{"Limit":{"type":"integer"},"Marker":{}}},"output":{"type":"structure","members":{"Keys":{"type":"list","member":{"type":"structure","members":{"KeyId":{},"KeyArn":{}}}},"NextMarker":{},"Truncated":{"type":"boolean"}}}},"ListResourceTags":{"input":{"type":"structure","required":["KeyId"],"members":{"KeyId":{},"Limit":{"type":"integer"},"Marker":{}}},"output":{"type":"structure","members":{"Tags":{"shape":"S10"},"NextMarker":{},"Truncated":{"type":"boolean"}}}},"ListRetirableGrants":{"input":{"type":"structure","required":["RetiringPrincipal"],"members":{"Limit":{"type":"integer"},"Marker":{},"RetiringPrincipal":{}}},"output":{"shape":"S39"}},"PutKeyPolicy":{"input":{"type":"structure","required":["KeyId","PolicyName","Policy"],"members":{"KeyId":{},"PolicyName":{},"Policy":{},"BypassPolicyLockoutSafetyCheck":{"type":"boolean"}}}},"ReEncrypt":{"input":{"type":"structure","required":["CiphertextBlob","DestinationKeyId"],"members":{"CiphertextBlob":{"type":"blob"},"SourceEncryptionContext":{"shape":"Sk"},"SourceKeyId":{},"DestinationKeyId":{},"DestinationEncryptionContext":{"shape":"Sk"},"SourceEncryptionAlgorithm":{},"DestinationEncryptionAlgorithm":{},"GrantTokens":{"shape":"Sn"}}},"output":{"type":"structure","members":{"CiphertextBlob":{"type":"blob"},"SourceKeyId":{},"KeyId":{},"SourceEncryptionAlgorithm":{},"DestinationEncryptionAlgorithm":{}}}},"ReplicateKey":{"input":{"type":"structure","required":["KeyId","ReplicaRegion"],"members":{"KeyId":{},"ReplicaRegion":{},"Policy":{},"BypassPolicyLockoutSafetyCheck":{"type":"boolean"},"Description":{},"Tags":{"shape":"S10"}}},"output":{"type":"structure","members":{"ReplicaKeyMetadata":{"shape":"S16"},"ReplicaPolicy":{},"ReplicaTags":{"shape":"S10"}}}},"RetireGrant":{"input":{"type":"structure","members":{"GrantToken":{},"KeyId":{},"GrantId":{}}}},"RevokeGrant":{"input":{"type":"structure","required":["KeyId","GrantId"],"members":{"KeyId":{},"GrantId":{}}}},"ScheduleKeyDeletion":{"input":{"type":"structure","required":["KeyId"],"members":{"KeyId":{},"PendingWindowInDays":{"type":"integer"}}},"output":{"type":"structure","members":{"KeyId":{},"DeletionDate":{"type":"timestamp"},"KeyState":{},"PendingWindowInDays":{"type":"integer"}}}},"Sign":{"input":{"type":"structure","required":["KeyId","Message","SigningAlgorithm"],"members":{"KeyId":{},"Message":{"shape":"S1q"},"MessageType":{},"GrantTokens":{"shape":"Sn"},"SigningAlgorithm":{}}},"output":{"type":"structure","members":{"KeyId":{},"Signature":{"type":"blob"},"SigningAlgorithm":{}}}},"TagResource":{"input":{"type":"structure","required":["KeyId","Tags"],"members":{"KeyId":{},"Tags":{"shape":"S10"}}}},"UntagResource":{"input":{"type":"structure","required":["KeyId","TagKeys"],"members":{"KeyId":{},"TagKeys":{"type":"list","member":{}}}}},"UpdateAlias":{"input":{"type":"structure","required":["AliasName","TargetKeyId"],"members":{"AliasName":{},"TargetKeyId":{}}}},"UpdateCustomKeyStore":{"input":{"type":"structure","required":["CustomKeyStoreId"],"members":{"CustomKeyStoreId":{},"NewCustomKeyStoreName":{},"KeyStorePassword":{"shape":"Sd"},"CloudHsmClusterId":{}}},"output":{"type":"structure","members":{}}},"UpdateKeyDescription":{"input":{"type":"structure","required":["KeyId","Description"],"members":{"KeyId":{},"Description":{}}}},"UpdatePrimaryRegion":{"input":{"type":"structure","required":["KeyId","PrimaryRegion"],"members":{"KeyId":{},"PrimaryRegion":{}}}},"Verify":{"input":{"type":"structure","required":["KeyId","Message","Signature","SigningAlgorithm"],"members":{"KeyId":{},"Message":{"shape":"S1q"},"MessageType":{},"Signature":{"type":"blob"},"SigningAlgorithm":{},"GrantTokens":{"shape":"Sn"}}},"output":{"type":"structure","members":{"KeyId":{},"SignatureValid":{"type":"boolean"},"SigningAlgorithm":{}}}}},"shapes":{"Sd":{"type":"string","sensitive":true},"Sh":{"type":"list","member":{}},"Sj":{"type":"structure","members":{"EncryptionContextSubset":{"shape":"Sk"},"EncryptionContextEquals":{"shape":"Sk"}}},"Sk":{"type":"map","key":{},"value":{}},"Sn":{"type":"list","member":{}},"Sw":{"type":"string","deprecated":true,"deprecatedMessage":"This enum has been deprecated. Instead, use the KeySpec enum."},"S10":{"type":"list","member":{"type":"structure","required":["TagKey","TagValue"],"members":{"TagKey":{},"TagValue":{}}}},"S16":{"type":"structure","required":["KeyId"],"members":{"AWSAccountId":{},"KeyId":{},"Arn":{},"CreationDate":{"type":"timestamp"},"Enabled":{"type":"boolean"},"Description":{},"KeyUsage":{},"KeyState":{},"DeletionDate":{"type":"timestamp"},"ValidTo":{"type":"timestamp"},"Origin":{},"CustomKeyStoreId":{},"CloudHsmClusterId":{},"ExpirationModel":{},"KeyManager":{},"CustomerMasterKeySpec":{"shape":"Sw","deprecated":true,"deprecatedMessage":"This field has been deprecated. Instead, use the KeySpec field."},"KeySpec":{},"EncryptionAlgorithms":{"shape":"S1d"},"SigningAlgorithms":{"shape":"S1f"},"MultiRegion":{"type":"boolean"},"MultiRegionConfiguration":{"type":"structure","members":{"MultiRegionKeyType":{},"PrimaryKey":{"shape":"S1j"},"ReplicaKeys":{"type":"list","member":{"shape":"S1j"}}}},"PendingDeletionWindowInDays":{"type":"integer"}}},"S1d":{"type":"list","member":{}},"S1f":{"type":"list","member":{}},"S1j":{"type":"structure","members":{"Arn":{},"Region":{}}},"S1q":{"type":"blob","sensitive":true},"S39":{"type":"structure","members":{"Grants":{"type":"list","member":{"type":"structure","members":{"KeyId":{},"GrantId":{},"Name":{},"CreationDate":{"type":"timestamp"},"GranteePrincipal":{},"RetiringPrincipal":{},"IssuingAccount":{},"Operations":{"shape":"Sh"},"Constraints":{"shape":"Sj"}}}},"NextMarker":{},"Truncated":{"type":"boolean"}}}}}; -/***/ }), - -/***/ 3226: -/***/ (function(__unusedmodule, exports) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -class BasicCredentialHandler { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - options.headers['Authorization'] = - 'Basic ' + - Buffer.from(this.username + ':' + this.password).toString('base64'); - } - // This handler cannot handle 401 - canHandleAuthentication(response) { - return false; - } - handleAuthentication(httpClient, requestInfo, objs) { - return null; - } -} -exports.BasicCredentialHandler = BasicCredentialHandler; -class BearerCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - options.headers['Authorization'] = 'Bearer ' + this.token; - } - // This handler cannot handle 401 - canHandleAuthentication(response) { - return false; - } - handleAuthentication(httpClient, requestInfo, objs) { - return null; - } -} -exports.BearerCredentialHandler = BearerCredentialHandler; -class PersonalAccessTokenCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - options.headers['Authorization'] = - 'Basic ' + Buffer.from('PAT:' + this.token).toString('base64'); - } - // This handler cannot handle 401 - canHandleAuthentication(response) { - return false; - } - handleAuthentication(httpClient, requestInfo, objs) { - return null; - } -} -exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; - - /***/ }), /***/ 3228: @@ -19195,6 +20009,21 @@ module.exports = {"pagination":{"DescribeActionTargets":{"input_token":"NextToke /***/ }), +/***/ 4004: +/***/ (function(__unusedmodule, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _default = '00000000-0000-0000-0000-000000000000'; +exports.default = _default; + +/***/ }), + /***/ 4008: /***/ (function(module) { @@ -19517,6 +20346,74 @@ Object.defineProperty(apiLoader.services['chimesdkidentity'], '2021-04-20', { module.exports = AWS.ChimeSDKIdentity; +/***/ }), + +/***/ 4177: +/***/ (function(__unusedmodule, exports) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.checkBypass = exports.getProxyUrl = void 0; +function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === 'https:'; + if (checkBypass(reqUrl)) { + return undefined; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env['https_proxy'] || process.env['HTTPS_PROXY']; + } + else { + return process.env['http_proxy'] || process.env['HTTP_PROXY']; + } + })(); + if (proxyVar) { + return new URL(proxyVar); + } + else { + return undefined; + } +} +exports.getProxyUrl = getProxyUrl; +function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; + if (!noProxy) { + return false; + } + // Determine the request port + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } + else if (reqUrl.protocol === 'http:') { + reqPort = 80; + } + else if (reqUrl.protocol === 'https:') { + reqPort = 443; + } + // Format the request hostname and hostname with port + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === 'number') { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + // Compare request host against noproxy + for (const upperNoProxyItem of noProxy + .split(',') + .map(x => x.trim().toUpperCase()) + .filter(x => x)) { + if (upperReqHosts.some(x => x === upperNoProxyItem)) { + return true; + } + } + return false; +} +exports.checkBypass = checkBypass; +//# sourceMappingURL=proxy.js.map + /***/ }), /***/ 4208: @@ -22199,6 +23096,36 @@ module.exports = { }; +/***/ }), + +/***/ 4659: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _crypto = _interopRequireDefault(__webpack_require__(6417)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return _crypto.default.createHash('md5').update(bytes).digest(); +} + +var _default = md5; +exports.default = _default; + /***/ }), /***/ 4662: @@ -23648,6 +24575,50 @@ module.exports = {"version":"2.0","metadata":{"apiVersion":"2018-10-30","endpoin /***/ }), +/***/ 5293: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _rng = _interopRequireDefault(__webpack_require__(6506)); + +var _stringify = _interopRequireDefault(__webpack_require__(1960)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function v4(options, buf, offset) { + options = options || {}; + + const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + + + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; + } + + return buf; + } + + return (0, _stringify.default)(rnds); +} + +var _default = v4; +exports.default = _default; + +/***/ }), + /***/ 5296: /***/ (function(module) { @@ -24033,6 +25004,71 @@ AWS.Signers.V3Https = inherit(AWS.Signers.V3, { module.exports = AWS.Signers.V3Https; +/***/ }), + +/***/ 5573: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (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.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; +const path = __importStar(__webpack_require__(5622)); +/** + * toPosixPath converts the given path to the posix form. On Windows, \\ will be + * replaced with /. + * + * @param pth. Path to transform. + * @return string Posix path. + */ +function toPosixPath(pth) { + return pth.replace(/[\\]/g, '/'); +} +exports.toPosixPath = toPosixPath; +/** + * toWin32Path converts the given path to the win32 form. On Linux, / will be + * replaced with \\. + * + * @param pth. Path to transform. + * @return string Win32 path. + */ +function toWin32Path(pth) { + return pth.replace(/[/]/g, '\\'); +} +exports.toWin32Path = toWin32Path; +/** + * toPlatformPath converts the given path to a platform-specific path. It does + * this by replacing instances of / and \ with the platform-specific path + * separator. + * + * @param pth The path to platformize. + * @return string The platform-specific path. + */ +function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path.sep); +} +exports.toPlatformPath = toPlatformPath; +//# sourceMappingURL=path-utils.js.map + /***/ }), /***/ 5575: @@ -24321,6 +25357,29 @@ module.exports = require("path"); /***/ }), +/***/ 5638: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _v = _interopRequireDefault(__webpack_require__(1136)); + +var _sha = _interopRequireDefault(__webpack_require__(9329)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const v5 = (0, _v.default)('v5', 0x50, _sha.default); +var _default = v5; +exports.default = _default; + +/***/ }), + /***/ 5642: /***/ (function(module) { @@ -26515,6 +27574,92 @@ module.exports = {"version":2,"waiters":{"ClusterRunning":{"delay":30,"operation /***/ }), +/***/ 6025: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "v1", { + enumerable: true, + get: function () { + return _v.default; + } +}); +Object.defineProperty(exports, "v3", { + enumerable: true, + get: function () { + return _v2.default; + } +}); +Object.defineProperty(exports, "v4", { + enumerable: true, + get: function () { + return _v3.default; + } +}); +Object.defineProperty(exports, "v5", { + enumerable: true, + get: function () { + return _v4.default; + } +}); +Object.defineProperty(exports, "NIL", { + enumerable: true, + get: function () { + return _nil.default; + } +}); +Object.defineProperty(exports, "version", { + enumerable: true, + get: function () { + return _version.default; + } +}); +Object.defineProperty(exports, "validate", { + enumerable: true, + get: function () { + return _validate.default; + } +}); +Object.defineProperty(exports, "stringify", { + enumerable: true, + get: function () { + return _stringify.default; + } +}); +Object.defineProperty(exports, "parse", { + enumerable: true, + get: function () { + return _parse.default; + } +}); + +var _v = _interopRequireDefault(__webpack_require__(1810)); + +var _v2 = _interopRequireDefault(__webpack_require__(7572)); + +var _v3 = _interopRequireDefault(__webpack_require__(5293)); + +var _v4 = _interopRequireDefault(__webpack_require__(5638)); + +var _nil = _interopRequireDefault(__webpack_require__(4004)); + +var _version = _interopRequireDefault(__webpack_require__(2135)); + +var _validate = _interopRequireDefault(__webpack_require__(6634)); + +var _stringify = _interopRequireDefault(__webpack_require__(1960)); + +var _parse = _interopRequireDefault(__webpack_require__(3204)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/***/ }), + /***/ 6039: /***/ (function(module) { @@ -26536,6 +27681,13 @@ module.exports = {"pagination":{"ListRules":{"input_token":"NextToken","output_t /***/ }), +/***/ 6052: +/***/ (function(module) { + +module.exports = {"pagination":{"ListConnections":{"input_token":"NextToken","output_token":"NextToken","limit_key":"MaxResults"},"ListHosts":{"input_token":"NextToken","output_token":"NextToken","limit_key":"MaxResults"}}}; + +/***/ }), + /***/ 6063: /***/ (function(module) { @@ -27789,6 +28941,7 @@ const file_command_1 = __webpack_require__(2102); const utils_1 = __webpack_require__(5082); const os = __importStar(__webpack_require__(2087)); const path = __importStar(__webpack_require__(5622)); +const uuid_1 = __webpack_require__(6025); const oidc_utils_1 = __webpack_require__(6742); /** * The code to exit an action @@ -27818,7 +28971,14 @@ function exportVariable(name, val) { process.env[name] = convertedVal; const filePath = process.env['GITHUB_ENV'] || ''; if (filePath) { - const delimiter = '_GitHubActionsFileCommandDelimeter_'; + const delimiter = `ghadelimiter_${uuid_1.v4()}`; + // These should realistically never happen, but just in case someone finds a way to exploit uuid generation let's not allow keys or values that contain the delimiter. + if (name.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedVal.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`; file_command_1.issueCommand('ENV', commandValue); } @@ -28064,6 +29224,23 @@ function getIDToken(aud) { }); } exports.getIDToken = getIDToken; +/** + * Summary exports + */ +var summary_1 = __webpack_require__(7665); +Object.defineProperty(exports, "summary", { enumerable: true, get: function () { return summary_1.summary; } }); +/** + * @deprecated use core.summary + */ +var summary_2 = __webpack_require__(7665); +Object.defineProperty(exports, "markdownSummary", { enumerable: true, get: function () { return summary_2.markdownSummary; } }); +/** + * Path exports + */ +var path_utils_1 = __webpack_require__(5573); +Object.defineProperty(exports, "toPosixPath", { enumerable: true, get: function () { return path_utils_1.toPosixPath; } }); +Object.defineProperty(exports, "toWin32Path", { enumerable: true, get: function () { return path_utils_1.toWin32Path; } }); +Object.defineProperty(exports, "toPlatformPath", { enumerable: true, get: function () { return path_utils_1.toPlatformPath; } }); //# sourceMappingURL=core.js.map /***/ }), @@ -28096,6 +29273,37 @@ module.exports = {"version":"2.0","metadata":{"apiVersion":"2019-11-15","endpoin /***/ }), +/***/ 6506: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = rng; + +var _crypto = _interopRequireDefault(__webpack_require__(6417)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate + +let poolPtr = rnds8Pool.length; + +function rng() { + if (poolPtr > rnds8Pool.length - 16) { + _crypto.default.randomFillSync(rnds8Pool); + + poolPtr = 0; + } + + return rnds8Pool.slice(poolPtr, poolPtr += 16); +} + +/***/ }), + /***/ 6515: /***/ (function(module, __unusedexports, __webpack_require__) { @@ -28168,547 +29376,9 @@ module.exports = {"version":"2.0","metadata":{"apiVersion":"2018-09-17","endpoin /***/ }), /***/ 6539: -/***/ (function(__unusedmodule, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const http = __webpack_require__(8605); -const https = __webpack_require__(7211); -const pm = __webpack_require__(2950); -let tunnel; -var HttpCodes; -(function (HttpCodes) { - HttpCodes[HttpCodes["OK"] = 200] = "OK"; - HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; - HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; - HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; - HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; - HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; - HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; - HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; - HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; - HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; - HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; -})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); -var Headers; -(function (Headers) { - Headers["Accept"] = "accept"; - Headers["ContentType"] = "content-type"; -})(Headers = exports.Headers || (exports.Headers = {})); -var MediaTypes; -(function (MediaTypes) { - MediaTypes["ApplicationJson"] = "application/json"; -})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); -/** - * Returns the proxy URL, depending upon the supplied url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ -function getProxyUrl(serverUrl) { - let proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ''; -} -exports.getProxyUrl = getProxyUrl; -const HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect -]; -const HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout -]; -const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; -const ExponentialBackoffCeiling = 10; -const ExponentialBackoffTimeSlice = 5; -class HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = 'HttpClientError'; - this.statusCode = statusCode; - Object.setPrototypeOf(this, HttpClientError.prototype); - } -} -exports.HttpClientError = HttpClientError; -class HttpClientResponse { - constructor(message) { - this.message = message; - } - readBody() { - return new Promise(async (resolve, reject) => { - let output = Buffer.alloc(0); - this.message.on('data', (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on('end', () => { - resolve(output.toString()); - }); - }); - } -} -exports.HttpClientResponse = HttpClientResponse; -function isHttps(requestUrl) { - let parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === 'https:'; -} -exports.isHttps = isHttps; -class HttpClient { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); - } - get(requestUrl, additionalHeaders) { - return this.request('GET', requestUrl, null, additionalHeaders || {}); - } - del(requestUrl, additionalHeaders) { - return this.request('DELETE', requestUrl, null, additionalHeaders || {}); - } - post(requestUrl, data, additionalHeaders) { - return this.request('POST', requestUrl, data, additionalHeaders || {}); - } - patch(requestUrl, data, additionalHeaders) { - return this.request('PATCH', requestUrl, data, additionalHeaders || {}); - } - put(requestUrl, data, additionalHeaders) { - return this.request('PUT', requestUrl, data, additionalHeaders || {}); - } - head(requestUrl, additionalHeaders) { - return this.request('HEAD', requestUrl, null, additionalHeaders || {}); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return this.request(verb, requestUrl, stream, additionalHeaders); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - async getJson(requestUrl, additionalHeaders = {}) { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - let res = await this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - } - async postJson(requestUrl, obj, additionalHeaders = {}) { - let data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - let res = await this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - } - async putJson(requestUrl, obj, additionalHeaders = {}) { - let data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - let res = await this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - } - async patchJson(requestUrl, obj, additionalHeaders = {}) { - let data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - let res = await this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - async request(verb, requestUrl, data, headers) { - if (this._disposed) { - throw new Error('Client has already been disposed.'); - } - let parsedUrl = new URL(requestUrl); - let info = this._prepareRequest(verb, parsedUrl, headers); - // Only perform retries on reads since writes may not be idempotent. - let maxTries = this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1 - ? this._maxRetries + 1 - : 1; - let numTries = 0; - let response; - while (numTries < maxTries) { - response = await this.requestRaw(info, data); - // Check if it's an authentication challenge - if (response && - response.message && - response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (let i = 0; i < this.handlers.length; i++) { - if (this.handlers[i].canHandleAuthentication(response)) { - authenticationHandler = this.handlers[i]; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info, data); - } - else { - // We have received an unauthorized response but have no handlers to handle it. - // Let the response return to the caller. - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 && - this._allowRedirects && - redirectsRemaining > 0) { - const redirectUrl = response.message.headers['location']; - if (!redirectUrl) { - // if there's no location to redirect to, we won't - break; - } - let parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol == 'https:' && - parsedUrl.protocol != parsedRedirectUrl.protocol && - !this._allowRedirectDowngrade) { - throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); - } - // we need to finish reading the response before reassigning response - // which will leak the open socket. - await response.readBody(); - // strip authorization header if redirected to a different hostname - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (let header in headers) { - // header names are case insensitive - if (header.toLowerCase() === 'authorization') { - delete headers[header]; - } - } - } - // let's make the request with the new redirectUrl - info = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = await this.requestRaw(info, data); - redirectsRemaining--; - } - if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) { - // If not a retry code, return immediately instead of retrying - return response; - } - numTries += 1; - if (numTries < maxTries) { - await response.readBody(); - await this._performExponentialBackoff(numTries); - } - } - return response; - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info, data) { - return new Promise((resolve, reject) => { - let callbackForResult = function (err, res) { - if (err) { - reject(err); - } - resolve(res); - }; - this.requestRawWithCallback(info, data, callbackForResult); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info, data, onResult) { - let socket; - if (typeof data === 'string') { - info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); - } - let callbackCalled = false; - let handleResult = (err, res) => { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - }; - let req = info.httpModule.request(info.options, (msg) => { - let res = new HttpClientResponse(msg); - handleResult(null, res); - }); - req.on('socket', sock => { - socket = sock; - }); - // If we ever get disconnected, we want the socket to timeout eventually - req.setTimeout(this._socketTimeout || 3 * 60000, () => { - if (socket) { - socket.end(); - } - handleResult(new Error('Request timeout: ' + info.options.path), null); - }); - req.on('error', function (err) { - // err has statusCode property - // res should have headers - handleResult(err, null); - }); - if (data && typeof data === 'string') { - req.write(data, 'utf8'); - } - if (data && typeof data !== 'string') { - data.on('close', function () { - req.end(); - }); - data.pipe(req); - } - else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - let parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info = {}; - info.parsedUrl = requestUrl; - const usingSsl = info.parsedUrl.protocol === 'https:'; - info.httpModule = usingSsl ? https : http; - const defaultPort = usingSsl ? 443 : 80; - info.options = {}; - info.options.host = info.parsedUrl.hostname; - info.options.port = info.parsedUrl.port - ? parseInt(info.parsedUrl.port) - : defaultPort; - info.options.path = - (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); - info.options.method = method; - info.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info.options.headers['user-agent'] = this.userAgent; - } - info.options.agent = this._getAgent(info.parsedUrl); - // gives handlers an opportunity to participate - if (this.handlers) { - this.handlers.forEach(handler => { - handler.prepareRequest(info.options); - }); - } - return info; - } - _mergeHeaders(headers) { - const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers)); - } - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default) { - const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default; - } - _getAgent(parsedUrl) { - let agent; - let proxyUrl = pm.getProxyUrl(parsedUrl); - let useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (this._keepAlive && !useProxy) { - agent = this._agent; - } - // if agent is already assigned use that agent. - if (!!agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === 'https:'; - let maxSockets = 100; - if (!!this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (useProxy) { - // If using proxy, need tunnel - if (!tunnel) { - tunnel = __webpack_require__(7413); - } - const agentOptions = { - maxSockets: maxSockets, - keepAlive: this._keepAlive, - proxy: { - ...((proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), - host: proxyUrl.hostname, - port: proxyUrl.port - } - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === 'https:'; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } - else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - // if reusing agent across request and tunneling agent isn't assigned create a new agent - if (this._keepAlive && !agent) { - const options = { keepAlive: this._keepAlive, maxSockets: maxSockets }; - agent = usingSsl ? new https.Agent(options) : new http.Agent(options); - this._agent = agent; - } - // if not using private agent and tunnel agent isn't setup then use global agent - if (!agent) { - agent = usingSsl ? https.globalAgent : http.globalAgent; - } - if (usingSsl && this._ignoreSslError) { - // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process - // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options - // we have to cast it to any and change it directly - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _performExponentialBackoff(retryNumber) { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise(resolve => setTimeout(() => resolve(), ms)); - } - static dateTimeDeserializer(key, value) { - if (typeof value === 'string') { - let a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - async _processResponse(res, options) { - return new Promise(async (resolve, reject) => { - const statusCode = res.message.statusCode; - const response = { - statusCode: statusCode, - result: null, - headers: {} - }; - // not found leads to null obj returned - if (statusCode == HttpCodes.NotFound) { - resolve(response); - } - let obj; - let contents; - // get the result from the body - try { - contents = await res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, HttpClient.dateTimeDeserializer); - } - else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } - catch (err) { - // Invalid resource (contents not json); leaving result obj null - } - // note that 3xx redirects are handled by the http layer. - if (statusCode > 299) { - let msg; - // if exception/error in body, attempt to get better error - if (obj && obj.message) { - msg = obj.message; - } - else if (contents && contents.length > 0) { - // it may be the case that the exception is in the body message as string - msg = contents; - } - else { - msg = 'Failed request: (' + statusCode + ')'; - } - let err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } - else { - resolve(response); - } - }); - } -} -exports.HttpClient = HttpClient; +/***/ (function(module) { +module.exports = {"version":"2.0","metadata":{"apiVersion":"2018-08-20","endpointPrefix":"s3-control","protocol":"rest-xml","serviceFullName":"AWS S3 Control","serviceId":"S3 Control","signatureVersion":"s3v4","signingName":"s3","uid":"s3control-2018-08-20"},"operations":{"CreateAccessPoint":{"http":{"method":"PUT","requestUri":"/v20180820/accesspoint/{name}"},"input":{"locationName":"CreateAccessPointRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","Name","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"},"Bucket":{},"VpcConfiguration":{"shape":"S5"},"PublicAccessBlockConfiguration":{"shape":"S7"}}},"output":{"type":"structure","members":{"AccessPointArn":{},"Alias":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"CreateAccessPointForObjectLambda":{"http":{"method":"PUT","requestUri":"/v20180820/accesspointforobjectlambda/{name}"},"input":{"locationName":"CreateAccessPointForObjectLambdaRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","Name","Configuration"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"},"Configuration":{"shape":"Se"}}},"output":{"type":"structure","members":{"ObjectLambdaAccessPointArn":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"CreateBucket":{"http":{"method":"PUT","requestUri":"/v20180820/bucket/{name}"},"input":{"type":"structure","required":["Bucket"],"members":{"ACL":{"location":"header","locationName":"x-amz-acl"},"Bucket":{"location":"uri","locationName":"name"},"CreateBucketConfiguration":{"locationName":"CreateBucketConfiguration","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","members":{"LocationConstraint":{}}},"GrantFullControl":{"location":"header","locationName":"x-amz-grant-full-control"},"GrantRead":{"location":"header","locationName":"x-amz-grant-read"},"GrantReadACP":{"location":"header","locationName":"x-amz-grant-read-acp"},"GrantWrite":{"location":"header","locationName":"x-amz-grant-write"},"GrantWriteACP":{"location":"header","locationName":"x-amz-grant-write-acp"},"ObjectLockEnabledForBucket":{"location":"header","locationName":"x-amz-bucket-object-lock-enabled","type":"boolean"},"OutpostId":{"location":"header","locationName":"x-amz-outpost-id"}},"payload":"CreateBucketConfiguration"},"output":{"type":"structure","members":{"Location":{"location":"header","locationName":"Location"},"BucketArn":{}}},"httpChecksumRequired":true},"CreateJob":{"http":{"requestUri":"/v20180820/jobs"},"input":{"locationName":"CreateJobRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","Operation","Report","ClientRequestToken","Priority","RoleArn"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"ConfirmationRequired":{"type":"boolean"},"Operation":{"shape":"S19"},"Report":{"shape":"S2g"},"ClientRequestToken":{"idempotencyToken":true},"Manifest":{"shape":"S2k"},"Description":{},"Priority":{"type":"integer"},"RoleArn":{},"Tags":{"shape":"S1r"},"ManifestGenerator":{"shape":"S2v"}}},"output":{"type":"structure","members":{"JobId":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"CreateMultiRegionAccessPoint":{"http":{"requestUri":"/v20180820/async-requests/mrap/create"},"input":{"locationName":"CreateMultiRegionAccessPointRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","ClientToken","Details"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"ClientToken":{"idempotencyToken":true},"Details":{"shape":"S3b"}}},"output":{"type":"structure","members":{"RequestTokenARN":{}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"DeleteAccessPoint":{"http":{"method":"DELETE","requestUri":"/v20180820/accesspoint/{name}"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteAccessPointForObjectLambda":{"http":{"method":"DELETE","requestUri":"/v20180820/accesspointforobjectlambda/{name}"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteAccessPointPolicy":{"http":{"method":"DELETE","requestUri":"/v20180820/accesspoint/{name}/policy"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteAccessPointPolicyForObjectLambda":{"http":{"method":"DELETE","requestUri":"/v20180820/accesspointforobjectlambda/{name}/policy"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteBucket":{"http":{"method":"DELETE","requestUri":"/v20180820/bucket/{name}"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteBucketLifecycleConfiguration":{"http":{"method":"DELETE","requestUri":"/v20180820/bucket/{name}/lifecycleconfiguration"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteBucketPolicy":{"http":{"method":"DELETE","requestUri":"/v20180820/bucket/{name}/policy"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteBucketTagging":{"http":{"method":"DELETE","requestUri":"/v20180820/bucket/{name}/tagging","responseCode":204},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteJobTagging":{"http":{"method":"DELETE","requestUri":"/v20180820/jobs/{id}/tagging"},"input":{"type":"structure","required":["AccountId","JobId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"JobId":{"location":"uri","locationName":"id"}}},"output":{"type":"structure","members":{}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteMultiRegionAccessPoint":{"http":{"requestUri":"/v20180820/async-requests/mrap/delete"},"input":{"locationName":"DeleteMultiRegionAccessPointRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","ClientToken","Details"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"ClientToken":{"idempotencyToken":true},"Details":{"shape":"S3s"}}},"output":{"type":"structure","members":{"RequestTokenARN":{}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"DeletePublicAccessBlock":{"http":{"method":"DELETE","requestUri":"/v20180820/configuration/publicAccessBlock"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteStorageLensConfiguration":{"http":{"method":"DELETE","requestUri":"/v20180820/storagelens/{storagelensid}"},"input":{"type":"structure","required":["ConfigId","AccountId"],"members":{"ConfigId":{"location":"uri","locationName":"storagelensid"},"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DeleteStorageLensConfigurationTagging":{"http":{"method":"DELETE","requestUri":"/v20180820/storagelens/{storagelensid}/tagging"},"input":{"type":"structure","required":["ConfigId","AccountId"],"members":{"ConfigId":{"location":"uri","locationName":"storagelensid"},"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"}}},"output":{"type":"structure","members":{}},"endpoint":{"hostPrefix":"{AccountId}."}},"DescribeJob":{"http":{"method":"GET","requestUri":"/v20180820/jobs/{id}"},"input":{"type":"structure","required":["AccountId","JobId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"JobId":{"location":"uri","locationName":"id"}}},"output":{"type":"structure","members":{"Job":{"type":"structure","members":{"JobId":{},"ConfirmationRequired":{"type":"boolean"},"Description":{},"JobArn":{},"Status":{},"Manifest":{"shape":"S2k"},"Operation":{"shape":"S19"},"Priority":{"type":"integer"},"ProgressSummary":{"shape":"S44"},"StatusUpdateReason":{},"FailureReasons":{"type":"list","member":{"type":"structure","members":{"FailureCode":{},"FailureReason":{}}}},"Report":{"shape":"S2g"},"CreationTime":{"type":"timestamp"},"TerminationDate":{"type":"timestamp"},"RoleArn":{},"SuspendedDate":{"type":"timestamp"},"SuspendedCause":{},"ManifestGenerator":{"shape":"S2v"},"GeneratedManifestDescriptor":{"type":"structure","members":{"Format":{},"Location":{"shape":"S2p"}}}}}}},"endpoint":{"hostPrefix":"{AccountId}."}},"DescribeMultiRegionAccessPointOperation":{"http":{"method":"GET","requestUri":"/v20180820/async-requests/mrap/{request_token+}"},"input":{"type":"structure","required":["AccountId","RequestTokenARN"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"RequestTokenARN":{"location":"uri","locationName":"request_token"}}},"output":{"type":"structure","members":{"AsyncOperation":{"type":"structure","members":{"CreationTime":{"type":"timestamp"},"Operation":{},"RequestTokenARN":{},"RequestParameters":{"type":"structure","members":{"CreateMultiRegionAccessPointRequest":{"shape":"S3b"},"DeleteMultiRegionAccessPointRequest":{"shape":"S3s"},"PutMultiRegionAccessPointPolicyRequest":{"shape":"S4q"}}},"RequestStatus":{},"ResponseDetails":{"type":"structure","members":{"MultiRegionAccessPointDetails":{"type":"structure","members":{"Regions":{"type":"list","member":{"locationName":"Region","type":"structure","members":{"Name":{},"RequestStatus":{}}}}}},"ErrorDetails":{"type":"structure","members":{"Code":{},"Message":{},"Resource":{},"RequestId":{}}}}}}}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"GetAccessPoint":{"http":{"method":"GET","requestUri":"/v20180820/accesspoint/{name}"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Name":{},"Bucket":{},"NetworkOrigin":{},"VpcConfiguration":{"shape":"S5"},"PublicAccessBlockConfiguration":{"shape":"S7"},"CreationDate":{"type":"timestamp"},"Alias":{},"AccessPointArn":{},"Endpoints":{"type":"map","key":{},"value":{}}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetAccessPointConfigurationForObjectLambda":{"http":{"method":"GET","requestUri":"/v20180820/accesspointforobjectlambda/{name}/configuration"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Configuration":{"shape":"Se"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetAccessPointForObjectLambda":{"http":{"method":"GET","requestUri":"/v20180820/accesspointforobjectlambda/{name}"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Name":{},"PublicAccessBlockConfiguration":{"shape":"S7"},"CreationDate":{"type":"timestamp"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetAccessPointPolicy":{"http":{"method":"GET","requestUri":"/v20180820/accesspoint/{name}/policy"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Policy":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetAccessPointPolicyForObjectLambda":{"http":{"method":"GET","requestUri":"/v20180820/accesspointforobjectlambda/{name}/policy"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Policy":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetAccessPointPolicyStatus":{"http":{"method":"GET","requestUri":"/v20180820/accesspoint/{name}/policyStatus"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"PolicyStatus":{"shape":"S5f"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetAccessPointPolicyStatusForObjectLambda":{"http":{"method":"GET","requestUri":"/v20180820/accesspointforobjectlambda/{name}/policyStatus"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"PolicyStatus":{"shape":"S5f"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetBucket":{"http":{"method":"GET","requestUri":"/v20180820/bucket/{name}"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Bucket":{},"PublicAccessBlockEnabled":{"type":"boolean"},"CreationDate":{"type":"timestamp"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetBucketLifecycleConfiguration":{"http":{"method":"GET","requestUri":"/v20180820/bucket/{name}/lifecycleconfiguration"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Rules":{"shape":"S5o"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetBucketPolicy":{"http":{"method":"GET","requestUri":"/v20180820/bucket/{name}/policy"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Policy":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetBucketTagging":{"http":{"method":"GET","requestUri":"/v20180820/bucket/{name}/tagging"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","required":["TagSet"],"members":{"TagSet":{"shape":"S1r"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetJobTagging":{"http":{"method":"GET","requestUri":"/v20180820/jobs/{id}/tagging"},"input":{"type":"structure","required":["AccountId","JobId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"JobId":{"location":"uri","locationName":"id"}}},"output":{"type":"structure","members":{"Tags":{"shape":"S1r"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"GetMultiRegionAccessPoint":{"http":{"method":"GET","requestUri":"/v20180820/mrap/instances/{name}"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"AccessPoint":{"shape":"S6f"}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"GetMultiRegionAccessPointPolicy":{"http":{"method":"GET","requestUri":"/v20180820/mrap/instances/{name}/policy"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Policy":{"type":"structure","members":{"Established":{"type":"structure","members":{"Policy":{}}},"Proposed":{"type":"structure","members":{"Policy":{}}}}}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"GetMultiRegionAccessPointPolicyStatus":{"http":{"method":"GET","requestUri":"/v20180820/mrap/instances/{name}/policystatus"},"input":{"type":"structure","required":["AccountId","Name"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"}}},"output":{"type":"structure","members":{"Established":{"shape":"S5f"}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"GetPublicAccessBlock":{"http":{"method":"GET","requestUri":"/v20180820/configuration/publicAccessBlock"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"}}},"output":{"type":"structure","members":{"PublicAccessBlockConfiguration":{"shape":"S7"}},"payload":"PublicAccessBlockConfiguration"},"endpoint":{"hostPrefix":"{AccountId}."}},"GetStorageLensConfiguration":{"http":{"method":"GET","requestUri":"/v20180820/storagelens/{storagelensid}"},"input":{"type":"structure","required":["ConfigId","AccountId"],"members":{"ConfigId":{"location":"uri","locationName":"storagelensid"},"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"}}},"output":{"type":"structure","members":{"StorageLensConfiguration":{"shape":"S6w"}},"payload":"StorageLensConfiguration"},"endpoint":{"hostPrefix":"{AccountId}."}},"GetStorageLensConfigurationTagging":{"http":{"method":"GET","requestUri":"/v20180820/storagelens/{storagelensid}/tagging"},"input":{"type":"structure","required":["ConfigId","AccountId"],"members":{"ConfigId":{"location":"uri","locationName":"storagelensid"},"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"}}},"output":{"type":"structure","members":{"Tags":{"shape":"S7q"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"ListAccessPoints":{"http":{"method":"GET","requestUri":"/v20180820/accesspoint"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"querystring","locationName":"bucket"},"NextToken":{"location":"querystring","locationName":"nextToken"},"MaxResults":{"location":"querystring","locationName":"maxResults","type":"integer"}}},"output":{"type":"structure","members":{"AccessPointList":{"type":"list","member":{"locationName":"AccessPoint","type":"structure","required":["Name","NetworkOrigin","Bucket"],"members":{"Name":{},"NetworkOrigin":{},"VpcConfiguration":{"shape":"S5"},"Bucket":{},"AccessPointArn":{},"Alias":{}}}},"NextToken":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"ListAccessPointsForObjectLambda":{"http":{"method":"GET","requestUri":"/v20180820/accesspointforobjectlambda"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"NextToken":{"location":"querystring","locationName":"nextToken"},"MaxResults":{"location":"querystring","locationName":"maxResults","type":"integer"}}},"output":{"type":"structure","members":{"ObjectLambdaAccessPointList":{"type":"list","member":{"locationName":"ObjectLambdaAccessPoint","type":"structure","required":["Name"],"members":{"Name":{},"ObjectLambdaAccessPointArn":{}}}},"NextToken":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"ListJobs":{"http":{"method":"GET","requestUri":"/v20180820/jobs"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"JobStatuses":{"location":"querystring","locationName":"jobStatuses","type":"list","member":{}},"NextToken":{"location":"querystring","locationName":"nextToken"},"MaxResults":{"location":"querystring","locationName":"maxResults","type":"integer"}}},"output":{"type":"structure","members":{"NextToken":{},"Jobs":{"type":"list","member":{"type":"structure","members":{"JobId":{},"Description":{},"Operation":{},"Priority":{"type":"integer"},"Status":{},"CreationTime":{"type":"timestamp"},"TerminationDate":{"type":"timestamp"},"ProgressSummary":{"shape":"S44"}}}}}},"endpoint":{"hostPrefix":"{AccountId}."}},"ListMultiRegionAccessPoints":{"http":{"method":"GET","requestUri":"/v20180820/mrap/instances"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"NextToken":{"location":"querystring","locationName":"nextToken"},"MaxResults":{"location":"querystring","locationName":"maxResults","type":"integer"}}},"output":{"type":"structure","members":{"AccessPoints":{"type":"list","member":{"shape":"S6f","locationName":"AccessPoint"}},"NextToken":{}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"ListRegionalBuckets":{"http":{"method":"GET","requestUri":"/v20180820/bucket"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"NextToken":{"location":"querystring","locationName":"nextToken"},"MaxResults":{"location":"querystring","locationName":"maxResults","type":"integer"},"OutpostId":{"location":"header","locationName":"x-amz-outpost-id"}}},"output":{"type":"structure","members":{"RegionalBucketList":{"type":"list","member":{"locationName":"RegionalBucket","type":"structure","required":["Bucket","PublicAccessBlockEnabled","CreationDate"],"members":{"Bucket":{},"BucketArn":{},"PublicAccessBlockEnabled":{"type":"boolean"},"CreationDate":{"type":"timestamp"},"OutpostId":{}}}},"NextToken":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"ListStorageLensConfigurations":{"http":{"method":"GET","requestUri":"/v20180820/storagelens"},"input":{"type":"structure","required":["AccountId"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"NextToken":{"location":"querystring","locationName":"nextToken"}}},"output":{"type":"structure","members":{"NextToken":{},"StorageLensConfigurationList":{"type":"list","member":{"locationName":"StorageLensConfiguration","type":"structure","required":["Id","StorageLensArn","HomeRegion"],"members":{"Id":{},"StorageLensArn":{},"HomeRegion":{},"IsEnabled":{"type":"boolean"}}},"flattened":true}}},"endpoint":{"hostPrefix":"{AccountId}."}},"PutAccessPointConfigurationForObjectLambda":{"http":{"method":"PUT","requestUri":"/v20180820/accesspointforobjectlambda/{name}/configuration"},"input":{"locationName":"PutAccessPointConfigurationForObjectLambdaRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","Name","Configuration"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"},"Configuration":{"shape":"Se"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"PutAccessPointPolicy":{"http":{"method":"PUT","requestUri":"/v20180820/accesspoint/{name}/policy"},"input":{"locationName":"PutAccessPointPolicyRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","Name","Policy"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"},"Policy":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"PutAccessPointPolicyForObjectLambda":{"http":{"method":"PUT","requestUri":"/v20180820/accesspointforobjectlambda/{name}/policy"},"input":{"locationName":"PutAccessPointPolicyForObjectLambdaRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","Name","Policy"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Name":{"location":"uri","locationName":"name"},"Policy":{}}},"endpoint":{"hostPrefix":"{AccountId}."}},"PutBucketLifecycleConfiguration":{"http":{"method":"PUT","requestUri":"/v20180820/bucket/{name}/lifecycleconfiguration"},"input":{"type":"structure","required":["AccountId","Bucket"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"},"LifecycleConfiguration":{"locationName":"LifecycleConfiguration","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","members":{"Rules":{"shape":"S5o"}}}},"payload":"LifecycleConfiguration"},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"PutBucketPolicy":{"http":{"method":"PUT","requestUri":"/v20180820/bucket/{name}/policy"},"input":{"locationName":"PutBucketPolicyRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","Bucket","Policy"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"},"ConfirmRemoveSelfBucketAccess":{"location":"header","locationName":"x-amz-confirm-remove-self-bucket-access","type":"boolean"},"Policy":{}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"PutBucketTagging":{"http":{"method":"PUT","requestUri":"/v20180820/bucket/{name}/tagging"},"input":{"type":"structure","required":["AccountId","Bucket","Tagging"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Bucket":{"location":"uri","locationName":"name"},"Tagging":{"locationName":"Tagging","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["TagSet"],"members":{"TagSet":{"shape":"S1r"}}}},"payload":"Tagging"},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"PutJobTagging":{"http":{"method":"PUT","requestUri":"/v20180820/jobs/{id}/tagging"},"input":{"locationName":"PutJobTaggingRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","JobId","Tags"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"JobId":{"location":"uri","locationName":"id"},"Tags":{"shape":"S1r"}}},"output":{"type":"structure","members":{}},"endpoint":{"hostPrefix":"{AccountId}."}},"PutMultiRegionAccessPointPolicy":{"http":{"requestUri":"/v20180820/async-requests/mrap/put-policy"},"input":{"locationName":"PutMultiRegionAccessPointPolicyRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["AccountId","ClientToken","Details"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"ClientToken":{"idempotencyToken":true},"Details":{"shape":"S4q"}}},"output":{"type":"structure","members":{"RequestTokenARN":{}}},"endpoint":{"hostPrefix":"{AccountId}."},"httpChecksumRequired":true},"PutPublicAccessBlock":{"http":{"method":"PUT","requestUri":"/v20180820/configuration/publicAccessBlock"},"input":{"type":"structure","required":["PublicAccessBlockConfiguration","AccountId"],"members":{"PublicAccessBlockConfiguration":{"shape":"S7","locationName":"PublicAccessBlockConfiguration","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"}},"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"}},"payload":"PublicAccessBlockConfiguration"},"endpoint":{"hostPrefix":"{AccountId}."}},"PutStorageLensConfiguration":{"http":{"method":"PUT","requestUri":"/v20180820/storagelens/{storagelensid}"},"input":{"locationName":"PutStorageLensConfigurationRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["ConfigId","AccountId","StorageLensConfiguration"],"members":{"ConfigId":{"location":"uri","locationName":"storagelensid"},"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"StorageLensConfiguration":{"shape":"S6w"},"Tags":{"shape":"S7q"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"PutStorageLensConfigurationTagging":{"http":{"method":"PUT","requestUri":"/v20180820/storagelens/{storagelensid}/tagging"},"input":{"locationName":"PutStorageLensConfigurationTaggingRequest","xmlNamespace":{"uri":"http://awss3control.amazonaws.com/doc/2018-08-20/"},"type":"structure","required":["ConfigId","AccountId","Tags"],"members":{"ConfigId":{"location":"uri","locationName":"storagelensid"},"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"Tags":{"shape":"S7q"}}},"output":{"type":"structure","members":{}},"endpoint":{"hostPrefix":"{AccountId}."}},"UpdateJobPriority":{"http":{"requestUri":"/v20180820/jobs/{id}/priority"},"input":{"type":"structure","required":["AccountId","JobId","Priority"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"JobId":{"location":"uri","locationName":"id"},"Priority":{"location":"querystring","locationName":"priority","type":"integer"}}},"output":{"type":"structure","required":["JobId","Priority"],"members":{"JobId":{},"Priority":{"type":"integer"}}},"endpoint":{"hostPrefix":"{AccountId}."}},"UpdateJobStatus":{"http":{"requestUri":"/v20180820/jobs/{id}/status"},"input":{"type":"structure","required":["AccountId","JobId","RequestedJobStatus"],"members":{"AccountId":{"hostLabel":true,"location":"header","locationName":"x-amz-account-id"},"JobId":{"location":"uri","locationName":"id"},"RequestedJobStatus":{"location":"querystring","locationName":"requestedJobStatus"},"StatusUpdateReason":{"location":"querystring","locationName":"statusUpdateReason"}}},"output":{"type":"structure","members":{"JobId":{},"Status":{},"StatusUpdateReason":{}}},"endpoint":{"hostPrefix":"{AccountId}."}}},"shapes":{"S5":{"type":"structure","required":["VpcId"],"members":{"VpcId":{}}},"S7":{"type":"structure","members":{"BlockPublicAcls":{"locationName":"BlockPublicAcls","type":"boolean"},"IgnorePublicAcls":{"locationName":"IgnorePublicAcls","type":"boolean"},"BlockPublicPolicy":{"locationName":"BlockPublicPolicy","type":"boolean"},"RestrictPublicBuckets":{"locationName":"RestrictPublicBuckets","type":"boolean"}}},"Se":{"type":"structure","required":["SupportingAccessPoint","TransformationConfigurations"],"members":{"SupportingAccessPoint":{},"CloudWatchMetricsEnabled":{"type":"boolean"},"AllowedFeatures":{"type":"list","member":{"locationName":"AllowedFeature"}},"TransformationConfigurations":{"type":"list","member":{"locationName":"TransformationConfiguration","type":"structure","required":["Actions","ContentTransformation"],"members":{"Actions":{"type":"list","member":{"locationName":"Action"}},"ContentTransformation":{"type":"structure","members":{"AwsLambda":{"type":"structure","required":["FunctionArn"],"members":{"FunctionArn":{},"FunctionPayload":{}}}},"union":true}}}}}},"S19":{"type":"structure","members":{"LambdaInvoke":{"type":"structure","members":{"FunctionArn":{}}},"S3PutObjectCopy":{"type":"structure","members":{"TargetResource":{},"CannedAccessControlList":{},"AccessControlGrants":{"shape":"S1e"},"MetadataDirective":{},"ModifiedSinceConstraint":{"type":"timestamp"},"NewObjectMetadata":{"type":"structure","members":{"CacheControl":{},"ContentDisposition":{},"ContentEncoding":{},"ContentLanguage":{},"UserMetadata":{"type":"map","key":{},"value":{}},"ContentLength":{"type":"long"},"ContentMD5":{},"ContentType":{},"HttpExpiresDate":{"type":"timestamp"},"RequesterCharged":{"type":"boolean"},"SSEAlgorithm":{}}},"NewObjectTagging":{"shape":"S1r"},"RedirectLocation":{},"RequesterPays":{"type":"boolean"},"StorageClass":{},"UnModifiedSinceConstraint":{"type":"timestamp"},"SSEAwsKmsKeyId":{},"TargetKeyPrefix":{},"ObjectLockLegalHoldStatus":{},"ObjectLockMode":{},"ObjectLockRetainUntilDate":{"type":"timestamp"},"BucketKeyEnabled":{"type":"boolean"},"ChecksumAlgorithm":{}}},"S3PutObjectAcl":{"type":"structure","members":{"AccessControlPolicy":{"type":"structure","members":{"AccessControlList":{"type":"structure","required":["Owner"],"members":{"Owner":{"type":"structure","members":{"ID":{},"DisplayName":{}}},"Grants":{"shape":"S1e"}}},"CannedAccessControlList":{}}}}},"S3PutObjectTagging":{"type":"structure","members":{"TagSet":{"shape":"S1r"}}},"S3DeleteObjectTagging":{"type":"structure","members":{}},"S3InitiateRestoreObject":{"type":"structure","members":{"ExpirationInDays":{"type":"integer"},"GlacierJobTier":{}}},"S3PutObjectLegalHold":{"type":"structure","required":["LegalHold"],"members":{"LegalHold":{"type":"structure","required":["Status"],"members":{"Status":{}}}}},"S3PutObjectRetention":{"type":"structure","required":["Retention"],"members":{"BypassGovernanceRetention":{"type":"boolean"},"Retention":{"type":"structure","members":{"RetainUntilDate":{"type":"timestamp"},"Mode":{}}}}},"S3ReplicateObject":{"type":"structure","members":{}}}},"S1e":{"type":"list","member":{"type":"structure","members":{"Grantee":{"type":"structure","members":{"TypeIdentifier":{},"Identifier":{},"DisplayName":{}}},"Permission":{}}}},"S1r":{"type":"list","member":{"shape":"S1s"}},"S1s":{"type":"structure","required":["Key","Value"],"members":{"Key":{},"Value":{}}},"S2g":{"type":"structure","required":["Enabled"],"members":{"Bucket":{},"Format":{},"Enabled":{"type":"boolean"},"Prefix":{},"ReportScope":{}}},"S2k":{"type":"structure","required":["Spec","Location"],"members":{"Spec":{"type":"structure","required":["Format"],"members":{"Format":{},"Fields":{"type":"list","member":{}}}},"Location":{"shape":"S2p"}}},"S2p":{"type":"structure","required":["ObjectArn","ETag"],"members":{"ObjectArn":{},"ObjectVersionId":{},"ETag":{}}},"S2v":{"type":"structure","members":{"S3JobManifestGenerator":{"type":"structure","required":["SourceBucket","EnableManifestOutput"],"members":{"ExpectedBucketOwner":{},"SourceBucket":{},"ManifestOutputLocation":{"type":"structure","required":["Bucket","ManifestFormat"],"members":{"ExpectedManifestBucketOwner":{},"Bucket":{},"ManifestPrefix":{},"ManifestEncryption":{"type":"structure","members":{"SSES3":{"locationName":"SSE-S3","type":"structure","members":{}},"SSEKMS":{"locationName":"SSE-KMS","type":"structure","required":["KeyId"],"members":{"KeyId":{}}}}},"ManifestFormat":{}}},"Filter":{"type":"structure","members":{"EligibleForReplication":{"type":"boolean"},"CreatedAfter":{"type":"timestamp"},"CreatedBefore":{"type":"timestamp"},"ObjectReplicationStatuses":{"type":"list","member":{}}}},"EnableManifestOutput":{"type":"boolean"}}}},"union":true},"S3b":{"type":"structure","required":["Name","Regions"],"members":{"Name":{},"PublicAccessBlock":{"shape":"S7"},"Regions":{"type":"list","member":{"locationName":"Region","type":"structure","required":["Bucket"],"members":{"Bucket":{}}}}}},"S3s":{"type":"structure","required":["Name"],"members":{"Name":{}}},"S44":{"type":"structure","members":{"TotalNumberOfTasks":{"type":"long"},"NumberOfTasksSucceeded":{"type":"long"},"NumberOfTasksFailed":{"type":"long"},"Timers":{"type":"structure","members":{"ElapsedTimeInActiveSeconds":{"type":"long"}}}}},"S4q":{"type":"structure","required":["Name","Policy"],"members":{"Name":{},"Policy":{}}},"S5f":{"type":"structure","members":{"IsPublic":{"locationName":"IsPublic","type":"boolean"}}},"S5o":{"type":"list","member":{"locationName":"Rule","type":"structure","required":["Status"],"members":{"Expiration":{"type":"structure","members":{"Date":{"type":"timestamp"},"Days":{"type":"integer"},"ExpiredObjectDeleteMarker":{"type":"boolean"}}},"ID":{},"Filter":{"type":"structure","members":{"Prefix":{},"Tag":{"shape":"S1s"},"And":{"type":"structure","members":{"Prefix":{},"Tags":{"shape":"S1r"}}}}},"Status":{},"Transitions":{"type":"list","member":{"locationName":"Transition","type":"structure","members":{"Date":{"type":"timestamp"},"Days":{"type":"integer"},"StorageClass":{}}}},"NoncurrentVersionTransitions":{"type":"list","member":{"locationName":"NoncurrentVersionTransition","type":"structure","members":{"NoncurrentDays":{"type":"integer"},"StorageClass":{}}}},"NoncurrentVersionExpiration":{"type":"structure","members":{"NoncurrentDays":{"type":"integer"}}},"AbortIncompleteMultipartUpload":{"type":"structure","members":{"DaysAfterInitiation":{"type":"integer"}}}}}},"S6f":{"type":"structure","members":{"Name":{},"Alias":{},"CreatedAt":{"type":"timestamp"},"PublicAccessBlock":{"shape":"S7"},"Status":{},"Regions":{"type":"list","member":{"locationName":"Region","type":"structure","members":{"Bucket":{},"Region":{}}}}}},"S6w":{"type":"structure","required":["Id","AccountLevel","IsEnabled"],"members":{"Id":{},"AccountLevel":{"type":"structure","required":["BucketLevel"],"members":{"ActivityMetrics":{"shape":"S6y"},"BucketLevel":{"type":"structure","members":{"ActivityMetrics":{"shape":"S6y"},"PrefixLevel":{"type":"structure","required":["StorageMetrics"],"members":{"StorageMetrics":{"type":"structure","members":{"IsEnabled":{"type":"boolean"},"SelectionCriteria":{"type":"structure","members":{"Delimiter":{},"MaxDepth":{"type":"integer"},"MinStorageBytesPercentage":{"type":"double"}}}}}}}}}}},"Include":{"type":"structure","members":{"Buckets":{"shape":"S78"},"Regions":{"shape":"S79"}}},"Exclude":{"type":"structure","members":{"Buckets":{"shape":"S78"},"Regions":{"shape":"S79"}}},"DataExport":{"type":"structure","members":{"S3BucketDestination":{"type":"structure","required":["Format","OutputSchemaVersion","AccountId","Arn"],"members":{"Format":{},"OutputSchemaVersion":{},"AccountId":{},"Arn":{},"Prefix":{},"Encryption":{"type":"structure","members":{"SSES3":{"locationName":"SSE-S3","type":"structure","members":{}},"SSEKMS":{"locationName":"SSE-KMS","type":"structure","required":["KeyId"],"members":{"KeyId":{}}}}}}},"CloudWatchMetrics":{"type":"structure","required":["IsEnabled"],"members":{"IsEnabled":{"type":"boolean"}}}}},"IsEnabled":{"type":"boolean"},"AwsOrg":{"type":"structure","required":["Arn"],"members":{"Arn":{}}},"StorageLensArn":{}}},"S6y":{"type":"structure","members":{"IsEnabled":{"type":"boolean"}}},"S78":{"type":"list","member":{"locationName":"Arn"}},"S79":{"type":"list","member":{"locationName":"Region"}},"S7q":{"type":"list","member":{"locationName":"Tag","type":"structure","required":["Key","Value"],"members":{"Key":{},"Value":{}}}}}}; /***/ }), @@ -29035,6 +29705,30 @@ module.exports = {"version":"2.0","metadata":{"apiVersion":"2016-01-14","endpoin /***/ }), +/***/ 6634: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _regex = _interopRequireDefault(__webpack_require__(1525)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function validate(uuid) { + return typeof uuid === 'string' && _regex.default.test(uuid); +} + +var _default = validate; +exports.default = _default; + +/***/ }), + /***/ 6685: /***/ (function(module) { @@ -29219,8 +29913,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", { value: true }); exports.OidcClient = void 0; -const http_client_1 = __webpack_require__(6539); -const auth_1 = __webpack_require__(3226); +const http_client_1 = __webpack_require__(2425); +const auth_1 = __webpack_require__(7554); const core_1 = __webpack_require__(6470); class OidcClient { static createHttpClient(allowRetry = true, maxRetry = 10) { @@ -32247,6 +32941,94 @@ Object.defineProperty(apiLoader.services['emrcontainers'], '2020-10-01', { module.exports = AWS.EMRcontainers; +/***/ }), + +/***/ 7554: +/***/ (function(__unusedmodule, 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()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; +class BasicCredentialHandler { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.BasicCredentialHandler = BasicCredentialHandler; +class BearerCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.BearerCredentialHandler = BearerCredentialHandler; +class PersonalAccessTokenCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; +//# sourceMappingURL=auth.js.map + /***/ }), /***/ 7555: @@ -32291,9 +33073,25 @@ module.exports = {"pagination":{"ListBrokers":{"input_token":"NextToken","output /***/ }), /***/ 7572: -/***/ (function(module) { +/***/ (function(__unusedmodule, exports, __webpack_require__) { -module.exports = {"pagination":{"ListConnections":{"input_token":"NextToken","output_token":"NextToken","limit_key":"MaxResults"},"ListHosts":{"input_token":"NextToken","output_token":"NextToken","limit_key":"MaxResults"}}}; +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _v = _interopRequireDefault(__webpack_require__(1136)); + +var _md = _interopRequireDefault(__webpack_require__(4659)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const v3 = (0, _v.default)('v3', 0x30, _md.default); +var _default = v3; +exports.default = _default; /***/ }), @@ -32558,6 +33356,296 @@ Object.defineProperty(apiLoader.services['fis'], '2020-12-01', { module.exports = AWS.Fis; +/***/ }), + +/***/ 7665: +/***/ (function(__unusedmodule, exports, __webpack_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()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; +const os_1 = __webpack_require__(2087); +const fs_1 = __webpack_require__(5747); +const { access, appendFile, writeFile } = fs_1.promises; +exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'; +exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary'; +class Summary { + constructor() { + this._buffer = ''; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } + catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs) + .map(([key, value]) => ` ${key}="${value}"`) + .join(''); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: 'utf8' }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ''; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, (lang && { lang })); + const element = this.wrap('pre', this.wrap('code', code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? 'ol' : 'ul'; + const listItems = items.map(item => this.wrap('li', item)).join(''); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows + .map(row => { + const cells = row + .map(cell => { + if (typeof cell === 'string') { + return this.wrap('td', cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? 'th' : 'td'; + const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan })); + return this.wrap(tag, data, attrs); + }) + .join(''); + return this.wrap('tr', cells); + }) + .join(''); + const element = this.wrap('table', tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap('details', this.wrap('summary', label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height })); + const element = this.wrap('img', null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag) + ? tag + : 'h1'; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap('hr', null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap('br', null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, (cite && { cite })); + const element = this.wrap('blockquote', text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap('a', text, { href }); + return this.addRaw(element).addEOL(); + } +} +const _summary = new Summary(); +/** + * @deprecated use `core.summary` + */ +exports.markdownSummary = _summary; +exports.summary = _summary; +//# sourceMappingURL=summary.js.map + /***/ }), /***/ 7672: @@ -37271,6 +38359,36 @@ var AWS = __webpack_require__(395); AWS.ECSCredentials = AWS.RemoteCredentials; +/***/ }), + +/***/ 9329: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _crypto = _interopRequireDefault(__webpack_require__(6417)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return _crypto.default.createHash('sha1').update(bytes).digest(); +} + +var _default = sha1; +exports.default = _default; + /***/ }), /***/ 9338: