mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-07-19 13:08:27 +02:00
feat: add @actions/cache
This commit is contained in:
parent
b15fb7d098
commit
16e8c96a41
1932 changed files with 261172 additions and 10 deletions
10
node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.browser.d.ts
generated
vendored
Normal file
10
node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.browser.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
import { AgentSettings } from "../serviceClient";
|
||||
import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy";
|
||||
import { HttpOperationResponse } from "../httpOperationResponse";
|
||||
import { WebResourceLike } from "../webResource";
|
||||
export declare function agentPolicy(_agentSettings?: AgentSettings): RequestPolicyFactory;
|
||||
export declare class AgentPolicy extends BaseRequestPolicy {
|
||||
constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike);
|
||||
sendRequest(_request: WebResourceLike): Promise<HttpOperationResponse>;
|
||||
}
|
||||
//# sourceMappingURL=agentPolicy.browser.d.ts.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.browser.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.browser.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"agentPolicy.browser.d.ts","sourceRoot":"","sources":["../../../lib/policies/agentPolicy.browser.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAIjD,wBAAgB,WAAW,CAAC,cAAc,CAAC,EAAE,aAAa,GAAG,oBAAoB,CAMhF;AAED,qBAAa,WAAY,SAAQ,iBAAiB;gBACpC,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,wBAAwB;IAKjE,WAAW,CAAC,QAAQ,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAG9E"}
|
26
node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.browser.js
generated
vendored
Normal file
26
node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.browser.js
generated
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
import { __extends } from "tslib";
|
||||
import { BaseRequestPolicy, } from "./requestPolicy";
|
||||
var agentNotSupportedInBrowser = new Error("AgentPolicy is not supported in browser environment");
|
||||
export function agentPolicy(_agentSettings) {
|
||||
return {
|
||||
create: function (_nextPolicy, _options) {
|
||||
throw agentNotSupportedInBrowser;
|
||||
},
|
||||
};
|
||||
}
|
||||
var AgentPolicy = /** @class */ (function (_super) {
|
||||
__extends(AgentPolicy, _super);
|
||||
function AgentPolicy(nextPolicy, options) {
|
||||
var _this = _super.call(this, nextPolicy, options) || this;
|
||||
throw agentNotSupportedInBrowser;
|
||||
return _this;
|
||||
}
|
||||
AgentPolicy.prototype.sendRequest = function (_request) {
|
||||
throw agentNotSupportedInBrowser;
|
||||
};
|
||||
return AgentPolicy;
|
||||
}(BaseRequestPolicy));
|
||||
export { AgentPolicy };
|
||||
//# sourceMappingURL=agentPolicy.browser.js.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.browser.js.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.browser.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"agentPolicy.browser.js","sourceRoot":"","sources":["../../../lib/policies/agentPolicy.browser.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAG/F,OAAO,EACL,iBAAiB,GAIlB,MAAM,iBAAiB,CAAC;AAIzB,IAAM,0BAA0B,GAAG,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;AAEpG,MAAM,UAAU,WAAW,CAAC,cAA8B;IACxD,OAAO;QACL,MAAM,EAAE,UAAC,WAA0B,EAAE,QAAkC;YACrE,MAAM,0BAA0B,CAAC;QACnC,CAAC;KACF,CAAC;AACJ,CAAC;AAED;IAAiC,+BAAiB;IAChD,qBAAY,UAAyB,EAAE,OAAiC;QAAxE,YACE,kBAAM,UAAU,EAAE,OAAO,CAAC,SAE3B;QADC,MAAM,0BAA0B,CAAC;;IACnC,CAAC;IAEM,iCAAW,GAAlB,UAAmB,QAAyB;QAC1C,MAAM,0BAA0B,CAAC;IACnC,CAAC;IACH,kBAAC;AAAD,CAAC,AATD,CAAiC,iBAAiB,GASjD"}
|
11
node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.d.ts
generated
vendored
Normal file
11
node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
import { AgentSettings } from "../serviceClient";
|
||||
import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy";
|
||||
import { HttpOperationResponse } from "../httpOperationResponse";
|
||||
import { WebResourceLike } from "../webResource";
|
||||
export declare function agentPolicy(agentSettings?: AgentSettings): RequestPolicyFactory;
|
||||
export declare class AgentPolicy extends BaseRequestPolicy {
|
||||
agentSettings: AgentSettings;
|
||||
constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, agentSettings: AgentSettings);
|
||||
sendRequest(request: WebResourceLike): Promise<HttpOperationResponse>;
|
||||
}
|
||||
//# sourceMappingURL=agentPolicy.d.ts.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"agentPolicy.d.ts","sourceRoot":"","sources":["../../../lib/policies/agentPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,wBAAgB,WAAW,CAAC,aAAa,CAAC,EAAE,aAAa,GAAG,oBAAoB,CAM/E;AAED,qBAAa,WAAY,SAAQ,iBAAiB;IAChD,aAAa,EAAE,aAAa,CAAC;gBAG3B,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,wBAAwB,EACjC,aAAa,EAAE,aAAa;IAMvB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAM7E"}
|
28
node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.js
generated
vendored
Normal file
28
node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.js
generated
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
import { __extends } from "tslib";
|
||||
import { BaseRequestPolicy, } from "./requestPolicy";
|
||||
export function agentPolicy(agentSettings) {
|
||||
return {
|
||||
create: function (nextPolicy, options) {
|
||||
return new AgentPolicy(nextPolicy, options, agentSettings);
|
||||
},
|
||||
};
|
||||
}
|
||||
var AgentPolicy = /** @class */ (function (_super) {
|
||||
__extends(AgentPolicy, _super);
|
||||
function AgentPolicy(nextPolicy, options, agentSettings) {
|
||||
var _this = _super.call(this, nextPolicy, options) || this;
|
||||
_this.agentSettings = agentSettings;
|
||||
return _this;
|
||||
}
|
||||
AgentPolicy.prototype.sendRequest = function (request) {
|
||||
if (!request.agentSettings) {
|
||||
request.agentSettings = this.agentSettings;
|
||||
}
|
||||
return this._nextPolicy.sendRequest(request);
|
||||
};
|
||||
return AgentPolicy;
|
||||
}(BaseRequestPolicy));
|
||||
export { AgentPolicy };
|
||||
//# sourceMappingURL=agentPolicy.js.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.js.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"agentPolicy.js","sourceRoot":"","sources":["../../../lib/policies/agentPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAG/F,OAAO,EACL,iBAAiB,GAIlB,MAAM,iBAAiB,CAAC;AAIzB,MAAM,UAAU,WAAW,CAAC,aAA6B;IACvD,OAAO;QACL,MAAM,EAAE,UAAC,UAAyB,EAAE,OAAiC;YACnE,OAAO,IAAI,WAAW,CAAC,UAAU,EAAE,OAAO,EAAE,aAAc,CAAC,CAAC;QAC9D,CAAC;KACF,CAAC;AACJ,CAAC;AAED;IAAiC,+BAAiB;IAGhD,qBACE,UAAyB,EACzB,OAAiC,EACjC,aAA4B;QAH9B,YAKE,kBAAM,UAAU,EAAE,OAAO,CAAC,SAE3B;QADC,KAAI,CAAC,aAAa,GAAG,aAAa,CAAC;;IACrC,CAAC;IAEM,iCAAW,GAAlB,UAAmB,OAAwB;QACzC,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE;YAC1B,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;SAC5C;QACD,OAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC;IACH,kBAAC;AAAD,CAAC,AAlBD,CAAiC,iBAAiB,GAkBjD"}
|
38
node_modules/@azure/ms-rest-js/es/lib/policies/deserializationPolicy.d.ts
generated
vendored
Normal file
38
node_modules/@azure/ms-rest-js/es/lib/policies/deserializationPolicy.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
import { HttpOperationResponse } from "../httpOperationResponse";
|
||||
import { WebResourceLike } from "../webResource";
|
||||
import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy";
|
||||
/**
|
||||
* The content-types that will indicate that an operation response should be deserialized in a
|
||||
* particular way.
|
||||
*/
|
||||
export interface DeserializationContentTypes {
|
||||
/**
|
||||
* The content-types that indicate that an operation response should be deserialized as JSON.
|
||||
* Defaults to [ "application/json", "text/json" ].
|
||||
*/
|
||||
json?: string[];
|
||||
/**
|
||||
* The content-types that indicate that an operation response should be deserialized as XML.
|
||||
* Defaults to [ "application/xml", "application/atom+xml" ].
|
||||
*/
|
||||
xml?: string[];
|
||||
}
|
||||
/**
|
||||
* Create a new serialization RequestPolicyCreator that will serialized HTTP request bodies as they
|
||||
* pass through the HTTP pipeline.
|
||||
*/
|
||||
export declare function deserializationPolicy(deserializationContentTypes?: DeserializationContentTypes): RequestPolicyFactory;
|
||||
export declare const defaultJsonContentTypes: string[];
|
||||
export declare const defaultXmlContentTypes: string[];
|
||||
/**
|
||||
* A RequestPolicy that will deserialize HTTP response bodies and headers as they pass through the
|
||||
* HTTP pipeline.
|
||||
*/
|
||||
export declare class DeserializationPolicy extends BaseRequestPolicy {
|
||||
readonly jsonContentTypes: string[];
|
||||
readonly xmlContentTypes: string[];
|
||||
constructor(nextPolicy: RequestPolicy, deserializationContentTypes: DeserializationContentTypes | undefined, options: RequestPolicyOptionsLike);
|
||||
sendRequest(request: WebResourceLike): Promise<HttpOperationResponse>;
|
||||
}
|
||||
export declare function deserializeResponseBody(jsonContentTypes: string[], xmlContentTypes: string[], response: HttpOperationResponse): Promise<HttpOperationResponse>;
|
||||
//# sourceMappingURL=deserializationPolicy.d.ts.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/deserializationPolicy.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/deserializationPolicy.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"deserializationPolicy.d.ts","sourceRoot":"","sources":["../../../lib/policies/deserializationPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAOjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,iBAAiB,CAAC;AAEzB;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;CAChB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,2BAA2B,CAAC,EAAE,2BAA2B,GACxD,oBAAoB,CAMtB;AAED,eAAO,MAAM,uBAAuB,UAAoC,CAAC;AACzE,eAAO,MAAM,sBAAsB,UAA8C,CAAC;AAElF;;;GAGG;AACH,qBAAa,qBAAsB,SAAQ,iBAAiB;IAC1D,SAAgB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3C,SAAgB,eAAe,EAAE,MAAM,EAAE,CAAC;gBAGxC,UAAU,EAAE,aAAa,EACzB,2BAA2B,EAAE,2BAA2B,GAAG,SAAS,EACpE,OAAO,EAAE,wBAAwB;IAUtB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAOnF;AAsCD,wBAAgB,uBAAuB,CACrC,gBAAgB,EAAE,MAAM,EAAE,EAC1B,eAAe,EAAE,MAAM,EAAE,EACzB,QAAQ,EAAE,qBAAqB,GAC9B,OAAO,CAAC,qBAAqB,CAAC,CA4HhC"}
|
213
node_modules/@azure/ms-rest-js/es/lib/policies/deserializationPolicy.js
generated
vendored
Normal file
213
node_modules/@azure/ms-rest-js/es/lib/policies/deserializationPolicy.js
generated
vendored
Normal file
|
@ -0,0 +1,213 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
import { __awaiter, __extends, __generator } from "tslib";
|
||||
import { isStreamOperation } from "../operationSpec";
|
||||
import { RestError } from "../restError";
|
||||
import { MapperType } from "../serializer";
|
||||
import * as utils from "../util/utils";
|
||||
import { parseXML } from "../util/xml";
|
||||
import { BaseRequestPolicy, } from "./requestPolicy";
|
||||
/**
|
||||
* Create a new serialization RequestPolicyCreator that will serialized HTTP request bodies as they
|
||||
* pass through the HTTP pipeline.
|
||||
*/
|
||||
export function deserializationPolicy(deserializationContentTypes) {
|
||||
return {
|
||||
create: function (nextPolicy, options) {
|
||||
return new DeserializationPolicy(nextPolicy, deserializationContentTypes, options);
|
||||
},
|
||||
};
|
||||
}
|
||||
export var defaultJsonContentTypes = ["application/json", "text/json"];
|
||||
export var defaultXmlContentTypes = ["application/xml", "application/atom+xml"];
|
||||
/**
|
||||
* A RequestPolicy that will deserialize HTTP response bodies and headers as they pass through the
|
||||
* HTTP pipeline.
|
||||
*/
|
||||
var DeserializationPolicy = /** @class */ (function (_super) {
|
||||
__extends(DeserializationPolicy, _super);
|
||||
function DeserializationPolicy(nextPolicy, deserializationContentTypes, options) {
|
||||
var _this = _super.call(this, nextPolicy, options) || this;
|
||||
_this.jsonContentTypes =
|
||||
(deserializationContentTypes && deserializationContentTypes.json) || defaultJsonContentTypes;
|
||||
_this.xmlContentTypes =
|
||||
(deserializationContentTypes && deserializationContentTypes.xml) || defaultXmlContentTypes;
|
||||
return _this;
|
||||
}
|
||||
DeserializationPolicy.prototype.sendRequest = function (request) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var _this = this;
|
||||
return __generator(this, function (_a) {
|
||||
return [2 /*return*/, this._nextPolicy
|
||||
.sendRequest(request)
|
||||
.then(function (response) {
|
||||
return deserializeResponseBody(_this.jsonContentTypes, _this.xmlContentTypes, response);
|
||||
})];
|
||||
});
|
||||
});
|
||||
};
|
||||
return DeserializationPolicy;
|
||||
}(BaseRequestPolicy));
|
||||
export { DeserializationPolicy };
|
||||
function getOperationResponse(parsedResponse) {
|
||||
var result;
|
||||
var request = parsedResponse.request;
|
||||
var operationSpec = request.operationSpec;
|
||||
if (operationSpec) {
|
||||
var operationResponseGetter = request.operationResponseGetter;
|
||||
if (!operationResponseGetter) {
|
||||
result = operationSpec.responses[parsedResponse.status];
|
||||
}
|
||||
else {
|
||||
result = operationResponseGetter(operationSpec, parsedResponse);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function shouldDeserializeResponse(parsedResponse) {
|
||||
var shouldDeserialize = parsedResponse.request.shouldDeserialize;
|
||||
var result;
|
||||
if (shouldDeserialize === undefined) {
|
||||
result = true;
|
||||
}
|
||||
else if (typeof shouldDeserialize === "boolean") {
|
||||
result = shouldDeserialize;
|
||||
}
|
||||
else {
|
||||
result = shouldDeserialize(parsedResponse);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
export function deserializeResponseBody(jsonContentTypes, xmlContentTypes, response) {
|
||||
return parse(jsonContentTypes, xmlContentTypes, response).then(function (parsedResponse) {
|
||||
var shouldDeserialize = shouldDeserializeResponse(parsedResponse);
|
||||
if (shouldDeserialize) {
|
||||
var operationSpec = parsedResponse.request.operationSpec;
|
||||
if (operationSpec && operationSpec.responses) {
|
||||
var statusCode = parsedResponse.status;
|
||||
var expectedStatusCodes = Object.keys(operationSpec.responses);
|
||||
var hasNoExpectedStatusCodes = expectedStatusCodes.length === 0 ||
|
||||
(expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default");
|
||||
var responseSpec = getOperationResponse(parsedResponse);
|
||||
var isExpectedStatusCode = hasNoExpectedStatusCodes
|
||||
? 200 <= statusCode && statusCode < 300
|
||||
: !!responseSpec;
|
||||
if (!isExpectedStatusCode) {
|
||||
var defaultResponseSpec = operationSpec.responses.default;
|
||||
if (defaultResponseSpec) {
|
||||
var initialErrorMessage = isStreamOperation(operationSpec)
|
||||
? "Unexpected status code: " + statusCode
|
||||
: parsedResponse.bodyAsText;
|
||||
var error = new RestError(initialErrorMessage);
|
||||
error.statusCode = statusCode;
|
||||
error.request = utils.stripRequest(parsedResponse.request);
|
||||
error.response = utils.stripResponse(parsedResponse);
|
||||
var parsedErrorResponse = parsedResponse.parsedBody;
|
||||
try {
|
||||
if (parsedErrorResponse) {
|
||||
var defaultResponseBodyMapper = defaultResponseSpec.bodyMapper;
|
||||
if (defaultResponseBodyMapper &&
|
||||
defaultResponseBodyMapper.serializedName === "CloudError") {
|
||||
if (parsedErrorResponse.error) {
|
||||
parsedErrorResponse = parsedErrorResponse.error;
|
||||
}
|
||||
if (parsedErrorResponse.code) {
|
||||
error.code = parsedErrorResponse.code;
|
||||
}
|
||||
if (parsedErrorResponse.message) {
|
||||
error.message = parsedErrorResponse.message;
|
||||
}
|
||||
}
|
||||
else {
|
||||
var internalError = parsedErrorResponse;
|
||||
if (parsedErrorResponse.error) {
|
||||
internalError = parsedErrorResponse.error;
|
||||
}
|
||||
error.code = internalError.code;
|
||||
if (internalError.message) {
|
||||
error.message = internalError.message;
|
||||
}
|
||||
}
|
||||
if (defaultResponseBodyMapper) {
|
||||
var valueToDeserialize = parsedErrorResponse;
|
||||
if (operationSpec.isXML &&
|
||||
defaultResponseBodyMapper.type.name === MapperType.Sequence) {
|
||||
valueToDeserialize =
|
||||
typeof parsedErrorResponse === "object"
|
||||
? parsedErrorResponse[defaultResponseBodyMapper.xmlElementName]
|
||||
: [];
|
||||
}
|
||||
error.body = operationSpec.serializer.deserialize(defaultResponseBodyMapper, valueToDeserialize, "error.body");
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (defaultError) {
|
||||
error.message = "Error \"" + defaultError.message + "\" occurred in deserializing the responseBody - \"" + parsedResponse.bodyAsText + "\" for the default response.";
|
||||
}
|
||||
return Promise.reject(error);
|
||||
}
|
||||
}
|
||||
else if (responseSpec) {
|
||||
if (responseSpec.bodyMapper) {
|
||||
var valueToDeserialize = parsedResponse.parsedBody;
|
||||
if (operationSpec.isXML && responseSpec.bodyMapper.type.name === MapperType.Sequence) {
|
||||
valueToDeserialize =
|
||||
typeof valueToDeserialize === "object"
|
||||
? valueToDeserialize[responseSpec.bodyMapper.xmlElementName]
|
||||
: [];
|
||||
}
|
||||
try {
|
||||
parsedResponse.parsedBody = operationSpec.serializer.deserialize(responseSpec.bodyMapper, valueToDeserialize, "operationRes.parsedBody");
|
||||
}
|
||||
catch (error) {
|
||||
var restError = new RestError("Error " + error + " occurred in deserializing the responseBody - " + parsedResponse.bodyAsText);
|
||||
restError.request = utils.stripRequest(parsedResponse.request);
|
||||
restError.response = utils.stripResponse(parsedResponse);
|
||||
return Promise.reject(restError);
|
||||
}
|
||||
}
|
||||
else if (operationSpec.httpMethod === "HEAD") {
|
||||
// head methods never have a body, but we return a boolean to indicate presence/absence of the resource
|
||||
parsedResponse.parsedBody = response.status >= 200 && response.status < 300;
|
||||
}
|
||||
if (responseSpec.headersMapper) {
|
||||
parsedResponse.parsedHeaders = operationSpec.serializer.deserialize(responseSpec.headersMapper, parsedResponse.headers.rawHeaders(), "operationRes.parsedHeaders");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return Promise.resolve(parsedResponse);
|
||||
});
|
||||
}
|
||||
function parse(jsonContentTypes, xmlContentTypes, operationResponse) {
|
||||
var errorHandler = function (err) {
|
||||
var msg = "Error \"" + err + "\" occurred while parsing the response body - " + operationResponse.bodyAsText + ".";
|
||||
var errCode = err.code || RestError.PARSE_ERROR;
|
||||
var e = new RestError(msg, errCode, operationResponse.status, operationResponse.request, operationResponse, operationResponse.bodyAsText);
|
||||
return Promise.reject(e);
|
||||
};
|
||||
if (!operationResponse.request.streamResponseBody && operationResponse.bodyAsText) {
|
||||
var text_1 = operationResponse.bodyAsText;
|
||||
var contentType = operationResponse.headers.get("Content-Type") || "";
|
||||
var contentComponents = !contentType
|
||||
? []
|
||||
: contentType.split(";").map(function (component) { return component.toLowerCase(); });
|
||||
if (contentComponents.length === 0 ||
|
||||
contentComponents.some(function (component) { return jsonContentTypes.indexOf(component) !== -1; })) {
|
||||
return new Promise(function (resolve) {
|
||||
operationResponse.parsedBody = JSON.parse(text_1);
|
||||
resolve(operationResponse);
|
||||
}).catch(errorHandler);
|
||||
}
|
||||
else if (contentComponents.some(function (component) { return xmlContentTypes.indexOf(component) !== -1; })) {
|
||||
return parseXML(text_1)
|
||||
.then(function (body) {
|
||||
operationResponse.parsedBody = body;
|
||||
return operationResponse;
|
||||
})
|
||||
.catch(errorHandler);
|
||||
}
|
||||
}
|
||||
return Promise.resolve(operationResponse);
|
||||
}
|
||||
//# sourceMappingURL=deserializationPolicy.js.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/deserializationPolicy.js.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/deserializationPolicy.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
48
node_modules/@azure/ms-rest-js/es/lib/policies/exponentialRetryPolicy.d.ts
generated
vendored
Normal file
48
node_modules/@azure/ms-rest-js/es/lib/policies/exponentialRetryPolicy.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,48 @@
|
|||
import { HttpOperationResponse } from "../httpOperationResponse";
|
||||
import { WebResourceLike } from "../webResource";
|
||||
import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy";
|
||||
export interface RetryData {
|
||||
retryCount: number;
|
||||
retryInterval: number;
|
||||
error?: RetryError;
|
||||
}
|
||||
export interface RetryError extends Error {
|
||||
message: string;
|
||||
code?: string;
|
||||
innerError?: RetryError;
|
||||
}
|
||||
export declare function exponentialRetryPolicy(retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number): RequestPolicyFactory;
|
||||
/**
|
||||
* @class
|
||||
* Instantiates a new "ExponentialRetryPolicyFilter" instance.
|
||||
*/
|
||||
export declare class ExponentialRetryPolicy extends BaseRequestPolicy {
|
||||
/**
|
||||
* The client retry count.
|
||||
*/
|
||||
retryCount: number;
|
||||
/**
|
||||
* The client retry interval in milliseconds.
|
||||
*/
|
||||
retryInterval: number;
|
||||
/**
|
||||
* The minimum retry interval in milliseconds.
|
||||
*/
|
||||
minRetryInterval: number;
|
||||
/**
|
||||
* The maximum retry interval in milliseconds.
|
||||
*/
|
||||
maxRetryInterval: number;
|
||||
/**
|
||||
* @constructor
|
||||
* @param {RequestPolicy} nextPolicy The next RequestPolicy in the pipeline chain.
|
||||
* @param {RequestPolicyOptionsLike} options The options for this RequestPolicy.
|
||||
* @param {number} [retryCount] The client retry count.
|
||||
* @param {number} [retryInterval] The client retry interval, in milliseconds.
|
||||
* @param {number} [minRetryInterval] The minimum retry interval, in milliseconds.
|
||||
* @param {number} [maxRetryInterval] The maximum retry interval, in milliseconds.
|
||||
*/
|
||||
constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number);
|
||||
sendRequest(request: WebResourceLike): Promise<HttpOperationResponse>;
|
||||
}
|
||||
//# sourceMappingURL=exponentialRetryPolicy.d.ts.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/exponentialRetryPolicy.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/exponentialRetryPolicy.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"exponentialRetryPolicy.d.ts","sourceRoot":"","sources":["../../../lib/policies/exponentialRetryPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,iBAAiB,CAAC;AAGzB,MAAM,WAAW,SAAS;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AAED,MAAM,WAAW,UAAW,SAAQ,KAAK;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,wBAAgB,sBAAsB,CACpC,UAAU,CAAC,EAAE,MAAM,EACnB,aAAa,CAAC,EAAE,MAAM,EACtB,gBAAgB,CAAC,EAAE,MAAM,EACzB,gBAAgB,CAAC,EAAE,MAAM,GACxB,oBAAoB,CAatB;AAOD;;;GAGG;AACH,qBAAa,sBAAuB,SAAQ,iBAAiB;IAC3D;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;;;;;;OAQG;gBAED,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,wBAAwB,EACjC,UAAU,CAAC,EAAE,MAAM,EACnB,aAAa,CAAC,EAAE,MAAM,EACtB,gBAAgB,CAAC,EAAE,MAAM,EACzB,gBAAgB,CAAC,EAAE,MAAM;IAgBpB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAM7E"}
|
132
node_modules/@azure/ms-rest-js/es/lib/policies/exponentialRetryPolicy.js
generated
vendored
Normal file
132
node_modules/@azure/ms-rest-js/es/lib/policies/exponentialRetryPolicy.js
generated
vendored
Normal file
|
@ -0,0 +1,132 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
import { __extends } from "tslib";
|
||||
import * as utils from "../util/utils";
|
||||
import { BaseRequestPolicy, } from "./requestPolicy";
|
||||
import { RestError } from "../restError";
|
||||
export function exponentialRetryPolicy(retryCount, retryInterval, minRetryInterval, maxRetryInterval) {
|
||||
return {
|
||||
create: function (nextPolicy, options) {
|
||||
return new ExponentialRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval);
|
||||
},
|
||||
};
|
||||
}
|
||||
var DEFAULT_CLIENT_RETRY_INTERVAL = 1000 * 30;
|
||||
var DEFAULT_CLIENT_RETRY_COUNT = 3;
|
||||
var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 90;
|
||||
var DEFAULT_CLIENT_MIN_RETRY_INTERVAL = 1000 * 3;
|
||||
/**
|
||||
* @class
|
||||
* Instantiates a new "ExponentialRetryPolicyFilter" instance.
|
||||
*/
|
||||
var ExponentialRetryPolicy = /** @class */ (function (_super) {
|
||||
__extends(ExponentialRetryPolicy, _super);
|
||||
/**
|
||||
* @constructor
|
||||
* @param {RequestPolicy} nextPolicy The next RequestPolicy in the pipeline chain.
|
||||
* @param {RequestPolicyOptionsLike} options The options for this RequestPolicy.
|
||||
* @param {number} [retryCount] The client retry count.
|
||||
* @param {number} [retryInterval] The client retry interval, in milliseconds.
|
||||
* @param {number} [minRetryInterval] The minimum retry interval, in milliseconds.
|
||||
* @param {number} [maxRetryInterval] The maximum retry interval, in milliseconds.
|
||||
*/
|
||||
function ExponentialRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval) {
|
||||
var _this = _super.call(this, nextPolicy, options) || this;
|
||||
function isNumber(n) {
|
||||
return typeof n === "number";
|
||||
}
|
||||
_this.retryCount = isNumber(retryCount) ? retryCount : DEFAULT_CLIENT_RETRY_COUNT;
|
||||
_this.retryInterval = isNumber(retryInterval) ? retryInterval : DEFAULT_CLIENT_RETRY_INTERVAL;
|
||||
_this.minRetryInterval = isNumber(minRetryInterval)
|
||||
? minRetryInterval
|
||||
: DEFAULT_CLIENT_MIN_RETRY_INTERVAL;
|
||||
_this.maxRetryInterval = isNumber(maxRetryInterval)
|
||||
? maxRetryInterval
|
||||
: DEFAULT_CLIENT_MAX_RETRY_INTERVAL;
|
||||
return _this;
|
||||
}
|
||||
ExponentialRetryPolicy.prototype.sendRequest = function (request) {
|
||||
var _this = this;
|
||||
return this._nextPolicy
|
||||
.sendRequest(request.clone())
|
||||
.then(function (response) { return retry(_this, request, response); })
|
||||
.catch(function (error) { return retry(_this, request, error.response, undefined, error); });
|
||||
};
|
||||
return ExponentialRetryPolicy;
|
||||
}(BaseRequestPolicy));
|
||||
export { ExponentialRetryPolicy };
|
||||
/**
|
||||
* Determines if the operation should be retried and how long to wait until the next retry.
|
||||
*
|
||||
* @param {ExponentialRetryPolicy} policy The ExponentialRetryPolicy that this function is being called against.
|
||||
* @param {number} statusCode The HTTP status code.
|
||||
* @param {RetryData} retryData The retry data.
|
||||
* @return {boolean} True if the operation qualifies for a retry; false otherwise.
|
||||
*/
|
||||
function shouldRetry(policy, statusCode, retryData) {
|
||||
if (statusCode == undefined ||
|
||||
(statusCode < 500 && statusCode !== 408) ||
|
||||
statusCode === 501 ||
|
||||
statusCode === 505) {
|
||||
return false;
|
||||
}
|
||||
var currentCount;
|
||||
if (!retryData) {
|
||||
throw new Error("retryData for the ExponentialRetryPolicyFilter cannot be null.");
|
||||
}
|
||||
else {
|
||||
currentCount = retryData && retryData.retryCount;
|
||||
}
|
||||
return currentCount < policy.retryCount;
|
||||
}
|
||||
/**
|
||||
* Updates the retry data for the next attempt.
|
||||
*
|
||||
* @param {ExponentialRetryPolicy} policy The ExponentialRetryPolicy that this function is being called against.
|
||||
* @param {RetryData} retryData The retry data.
|
||||
* @param {RetryError} [err] The operation"s error, if any.
|
||||
*/
|
||||
function updateRetryData(policy, retryData, err) {
|
||||
if (!retryData) {
|
||||
retryData = {
|
||||
retryCount: 0,
|
||||
retryInterval: 0,
|
||||
};
|
||||
}
|
||||
if (err) {
|
||||
if (retryData.error) {
|
||||
err.innerError = retryData.error;
|
||||
}
|
||||
retryData.error = err;
|
||||
}
|
||||
// Adjust retry count
|
||||
retryData.retryCount++;
|
||||
// Adjust retry interval
|
||||
var incrementDelta = Math.pow(2, retryData.retryCount) - 1;
|
||||
var boundedRandDelta = policy.retryInterval * 0.8 +
|
||||
Math.floor(Math.random() * (policy.retryInterval * 1.2 - policy.retryInterval * 0.8));
|
||||
incrementDelta *= boundedRandDelta;
|
||||
retryData.retryInterval = Math.min(policy.minRetryInterval + incrementDelta, policy.maxRetryInterval);
|
||||
return retryData;
|
||||
}
|
||||
function retry(policy, request, response, retryData, requestError) {
|
||||
retryData = updateRetryData(policy, retryData, requestError);
|
||||
var isAborted = request.abortSignal && request.abortSignal.aborted;
|
||||
if (!isAborted && shouldRetry(policy, response && response.status, retryData)) {
|
||||
return utils
|
||||
.delay(retryData.retryInterval)
|
||||
.then(function () { return policy._nextPolicy.sendRequest(request.clone()); })
|
||||
.then(function (res) { return retry(policy, request, res, retryData, undefined); })
|
||||
.catch(function (err) { return retry(policy, request, response, retryData, err); });
|
||||
}
|
||||
else if (isAborted || requestError || !response) {
|
||||
// If the operation failed in the end, return all errors instead of just the last one
|
||||
var err = retryData.error ||
|
||||
new RestError("Failed to send the request.", RestError.REQUEST_SEND_ERROR, response && response.status, response && response.request, response);
|
||||
return Promise.reject(err);
|
||||
}
|
||||
else {
|
||||
return Promise.resolve(response);
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=exponentialRetryPolicy.js.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/exponentialRetryPolicy.js.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/exponentialRetryPolicy.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"exponentialRetryPolicy.js","sourceRoot":"","sources":["../../../lib/policies/exponentialRetryPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAG/F,OAAO,KAAK,KAAK,MAAM,eA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AAC,OAAO,CAAC,KAAK,EAAE,CAAC,EAA/C,CAA+C,CAAC;aAC3D,IAAI,CAAC,UAAC,GAAG,IAAK,OAAA,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,CAAC,EAAjD,CAAiD,CAAC;aAChE,KAAK,CAAC,UAAC,GAAG,IAAK,OAAA,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,CAAC,EAAhD,CAAgD,CAAC,CAAC;KACrE;SAAM,IAAI,SAAS,IAAI,YAAY,IAAI,CAAC,QAAQ,EAAE;QACjD,qFAAqF;QACrF,IAAM,GAAG,GACP,SAAS,CAAC,KAAK;YACf,IAAI,SAAS,CACX,6BAA6B,EAC7B,SAAS,CAAC,kBAAkB,EAC5B,QAAQ,IAAI,QAAQ,CAAC,MAAM,EAC3B,QAAQ,IAAI,QAAQ,CAAC,OAAO,EAC5B,QAAQ,CACT,CAAC;QACJ,OAAO,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;KAC5B;SAAM;QACL,OAAO,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;KAClC;AACH,CAAC"}
|
10
node_modules/@azure/ms-rest-js/es/lib/policies/generateClientRequestIdPolicy.d.ts
generated
vendored
Normal file
10
node_modules/@azure/ms-rest-js/es/lib/policies/generateClientRequestIdPolicy.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
import { HttpOperationResponse } from "../httpOperationResponse";
|
||||
import { WebResourceLike } from "../webResource";
|
||||
import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy";
|
||||
export declare function generateClientRequestIdPolicy(requestIdHeaderName?: string): RequestPolicyFactory;
|
||||
export declare class GenerateClientRequestIdPolicy extends BaseRequestPolicy {
|
||||
private _requestIdHeaderName;
|
||||
constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, _requestIdHeaderName: string);
|
||||
sendRequest(request: WebResourceLike): Promise<HttpOperationResponse>;
|
||||
}
|
||||
//# sourceMappingURL=generateClientRequestIdPolicy.d.ts.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/generateClientRequestIdPolicy.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/generateClientRequestIdPolicy.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"generateClientRequestIdPolicy.d.ts","sourceRoot":"","sources":["../../../lib/policies/generateClientRequestIdPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,iBAAiB,CAAC;AAEzB,wBAAgB,6BAA6B,CAC3C,mBAAmB,SAA2B,GAC7C,oBAAoB,CAMtB;AAED,qBAAa,6BAA8B,SAAQ,iBAAiB;IAIhE,OAAO,CAAC,oBAAoB;gBAF5B,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,wBAAwB,EACzB,oBAAoB,EAAE,MAAM;IAK/B,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAM7E"}
|
30
node_modules/@azure/ms-rest-js/es/lib/policies/generateClientRequestIdPolicy.js
generated
vendored
Normal file
30
node_modules/@azure/ms-rest-js/es/lib/policies/generateClientRequestIdPolicy.js
generated
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
import { __extends } from "tslib";
|
||||
import * as utils from "../util/utils";
|
||||
import { BaseRequestPolicy, } from "./requestPolicy";
|
||||
export function generateClientRequestIdPolicy(requestIdHeaderName) {
|
||||
if (requestIdHeaderName === void 0) { requestIdHeaderName = "x-ms-client-request-id"; }
|
||||
return {
|
||||
create: function (nextPolicy, options) {
|
||||
return new GenerateClientRequestIdPolicy(nextPolicy, options, requestIdHeaderName);
|
||||
},
|
||||
};
|
||||
}
|
||||
var GenerateClientRequestIdPolicy = /** @class */ (function (_super) {
|
||||
__extends(GenerateClientRequestIdPolicy, _super);
|
||||
function GenerateClientRequestIdPolicy(nextPolicy, options, _requestIdHeaderName) {
|
||||
var _this = _super.call(this, nextPolicy, options) || this;
|
||||
_this._requestIdHeaderName = _requestIdHeaderName;
|
||||
return _this;
|
||||
}
|
||||
GenerateClientRequestIdPolicy.prototype.sendRequest = function (request) {
|
||||
if (!request.headers.contains(this._requestIdHeaderName)) {
|
||||
request.headers.set(this._requestIdHeaderName, utils.generateUuid());
|
||||
}
|
||||
return this._nextPolicy.sendRequest(request);
|
||||
};
|
||||
return GenerateClientRequestIdPolicy;
|
||||
}(BaseRequestPolicy));
|
||||
export { GenerateClientRequestIdPolicy };
|
||||
//# sourceMappingURL=generateClientRequestIdPolicy.js.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/generateClientRequestIdPolicy.js.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/generateClientRequestIdPolicy.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"generateClientRequestIdPolicy.js","sourceRoot":"","sources":["../../../lib/policies/generateClientRequestIdPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAG/F,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AAEvC,OAAO,EACL,iBAAiB,GAIlB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,UAAU,6BAA6B,CAC3C,mBAA8C;IAA9C,oCAAA,EAAA,8CAA8C;IAE9C,OAAO;QACL,MAAM,EAAE,UAAC,UAAyB,EAAE,OAAiC;YACnE,OAAO,IAAI,6BAA6B,CAAC,UAAU,EAAE,OAAO,EAAE,mBAAmB,CAAC,CAAC;QACrF,CAAC;KACF,CAAC;AACJ,CAAC;AAED;IAAmD,iDAAiB;IAClE,uCACE,UAAyB,EACzB,OAAiC,EACzB,oBAA4B;QAHtC,YAKE,kBAAM,UAAU,EAAE,OAAO,CAAC,SAC3B;QAHS,0BAAoB,GAApB,oBAAoB,CAAQ;;IAGtC,CAAC;IAEM,mDAAW,GAAlB,UAAmB,OAAwB;QACzC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,oBAAoB,CAAC,EAAE;YACxD,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,oBAAoB,EAAE,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC;SACtE;QACD,OAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC;IACH,oCAAC;AAAD,CAAC,AAfD,CAAmD,iBAAiB,GAenE"}
|
10
node_modules/@azure/ms-rest-js/es/lib/policies/logPolicy.d.ts
generated
vendored
Normal file
10
node_modules/@azure/ms-rest-js/es/lib/policies/logPolicy.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
import { HttpOperationResponse } from "../httpOperationResponse";
|
||||
import { WebResourceLike } from "../webResource";
|
||||
import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy";
|
||||
export declare function logPolicy(logger?: any): RequestPolicyFactory;
|
||||
export declare class LogPolicy extends BaseRequestPolicy {
|
||||
logger?: any;
|
||||
constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, logger?: any);
|
||||
sendRequest(request: WebResourceLike): Promise<HttpOperationResponse>;
|
||||
}
|
||||
//# sourceMappingURL=logPolicy.d.ts.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/logPolicy.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/logPolicy.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"logPolicy.d.ts","sourceRoot":"","sources":["../../../lib/policies/logPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,iBAAiB,CAAC;AAEzB,wBAAgB,SAAS,CAAC,MAAM,GAAE,GAAiB,GAAG,oBAAoB,CAMzE;AAED,qBAAa,SAAU,SAAQ,iBAAiB;IAC9C,MAAM,CAAC,EAAE,GAAG,CAAC;gBAGX,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,wBAAwB,EACjC,MAAM,GAAE,GAAiB;IAMpB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAG7E"}
|
35
node_modules/@azure/ms-rest-js/es/lib/policies/logPolicy.js
generated
vendored
Normal file
35
node_modules/@azure/ms-rest-js/es/lib/policies/logPolicy.js
generated
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
import { __extends } from "tslib";
|
||||
import { BaseRequestPolicy, } from "./requestPolicy";
|
||||
export function logPolicy(logger) {
|
||||
if (logger === void 0) { logger = console.log; }
|
||||
return {
|
||||
create: function (nextPolicy, options) {
|
||||
return new LogPolicy(nextPolicy, options, logger);
|
||||
},
|
||||
};
|
||||
}
|
||||
var LogPolicy = /** @class */ (function (_super) {
|
||||
__extends(LogPolicy, _super);
|
||||
function LogPolicy(nextPolicy, options, logger) {
|
||||
if (logger === void 0) { logger = console.log; }
|
||||
var _this = _super.call(this, nextPolicy, options) || this;
|
||||
_this.logger = logger;
|
||||
return _this;
|
||||
}
|
||||
LogPolicy.prototype.sendRequest = function (request) {
|
||||
var _this = this;
|
||||
return this._nextPolicy.sendRequest(request).then(function (response) { return logResponse(_this, response); });
|
||||
};
|
||||
return LogPolicy;
|
||||
}(BaseRequestPolicy));
|
||||
export { LogPolicy };
|
||||
function logResponse(policy, response) {
|
||||
policy.logger(">> Request: " + JSON.stringify(response.request, undefined, 2));
|
||||
policy.logger(">> Response status code: " + response.status);
|
||||
var responseBody = response.bodyAsText;
|
||||
policy.logger(">> Body: " + responseBody);
|
||||
return Promise.resolve(response);
|
||||
}
|
||||
//# sourceMappingURL=logPolicy.js.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/logPolicy.js.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/logPolicy.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"logPolicy.js","sourceRoot":"","sources":["../../../lib/policies/logPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAI/F,OAAO,EACL,iBAAiB,GAIlB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,UAAU,SAAS,CAAC,MAAyB;IAAzB,uBAAA,EAAA,SAAc,OAAO,CAAC,GAAG;IACjD,OAAO;QACL,MAAM,EAAE,UAAC,UAAyB,EAAE,OAAiC;YACnE,OAAO,IAAI,SAAS,CAAC,UAAU,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QACpD,CAAC;KACF,CAAC;AACJ,CAAC;AAED;IAA+B,6BAAiB;IAG9C,mBACE,UAAyB,EACzB,OAAiC,EACjC,MAAyB;QAAzB,uBAAA,EAAA,SAAc,OAAO,CAAC,GAAG;QAH3B,YAKE,kBAAM,UAAU,EAAE,OAAO,CAAC,SAE3B;QADC,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;;IACvB,CAAC;IAEM,+BAAW,GAAlB,UAAmB,OAAwB;QAA3C,iBAEC;QADC,OAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,UAAC,QAAQ,IAAK,OAAA,WAAW,CAAC,KAAI,EAAE,QAAQ,CAAC,EAA3B,CAA2B,CAAC,CAAC;IAC/F,CAAC;IACH,gBAAC;AAAD,CAAC,AAfD,CAA+B,iBAAiB,GAe/C;;AAED,SAAS,WAAW,CAClB,MAAiB,EACjB,QAA+B;IAE/B,MAAM,CAAC,MAAM,CAAC,iBAAe,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC,CAAG,CAAC,CAAC;IAC/E,MAAM,CAAC,MAAM,CAAC,8BAA4B,QAAQ,CAAC,MAAQ,CAAC,CAAC;IAC7D,IAAM,YAAY,GAAG,QAAQ,CAAC,UAAU,CAAC;IACzC,MAAM,CAAC,MAAM,CAAC,cAAY,YAAc,CAAC,CAAC;IAC1C,OAAO,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AACnC,CAAC"}
|
4
node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.browser.d.ts
generated
vendored
Normal file
4
node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.browser.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
import { TelemetryInfo } from "./userAgentPolicy";
|
||||
export declare function getDefaultUserAgentKey(): string;
|
||||
export declare function getPlatformSpecificData(): TelemetryInfo[];
|
||||
//# sourceMappingURL=msRestUserAgentPolicy.browser.d.ts.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.browser.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.browser.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"msRestUserAgentPolicy.browser.d.ts","sourceRoot":"","sources":["../../../lib/policies/msRestUserAgentPolicy.browser.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAOlD,wBAAgB,sBAAsB,IAAI,MAAM,CAE/C;AAED,wBAAgB,uBAAuB,IAAI,aAAa,EAAE,CAQzD"}
|
14
node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.browser.js
generated
vendored
Normal file
14
node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.browser.js
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
export function getDefaultUserAgentKey() {
|
||||
return "x-ms-command-name";
|
||||
}
|
||||
export function getPlatformSpecificData() {
|
||||
var navigator = self.navigator;
|
||||
var osInfo = {
|
||||
key: "OS",
|
||||
value: (navigator.oscpu || navigator.platform).replace(" ", ""),
|
||||
};
|
||||
return [osInfo];
|
||||
}
|
||||
//# sourceMappingURL=msRestUserAgentPolicy.browser.js.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.browser.js.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.browser.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"msRestUserAgentPolicy.browser.js","sourceRoot":"","sources":["../../../lib/policies/msRestUserAgentPolicy.browser.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAc/F,MAAM,UAAU,sBAAsB;IACpC,OAAO,mBAAmB,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,uBAAuB;IACrC,IAAM,SAAS,GAAG,IAAI,CAAC,SAAwB,CAAC;IAChD,IAAM,MAAM,GAAG;QACb,GAAG,EAAE,IAAI;QACT,KAAK,EAAE,CAAC,SAAS,CAAC,KAAK,IAAI,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;KAChE,CAAC;IAEF,OAAO,CAAC,MAAM,CAAC,CAAC;AAClB,CAAC"}
|
4
node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.d.ts
generated
vendored
Normal file
4
node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
import { TelemetryInfo } from "./userAgentPolicy";
|
||||
export declare function getDefaultUserAgentKey(): string;
|
||||
export declare function getPlatformSpecificData(): TelemetryInfo[];
|
||||
//# sourceMappingURL=msRestUserAgentPolicy.d.ts.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"msRestUserAgentPolicy.d.ts","sourceRoot":"","sources":["../../../lib/policies/msRestUserAgentPolicy.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGlD,wBAAgB,sBAAsB,IAAI,MAAM,CAE/C;AAED,wBAAgB,uBAAuB,IAAI,aAAa,EAAE,CAYzD"}
|
19
node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.js
generated
vendored
Normal file
19
node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.js
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
import * as os from "os";
|
||||
import { Constants } from "../util/constants";
|
||||
export function getDefaultUserAgentKey() {
|
||||
return Constants.HeaderConstants.USER_AGENT;
|
||||
}
|
||||
export function getPlatformSpecificData() {
|
||||
var runtimeInfo = {
|
||||
key: "Node",
|
||||
value: process.version,
|
||||
};
|
||||
var osInfo = {
|
||||
key: "OS",
|
||||
value: "(" + os.arch() + "-" + os.type() + "-" + os.release() + ")",
|
||||
};
|
||||
return [runtimeInfo, osInfo];
|
||||
}
|
||||
//# sourceMappingURL=msRestUserAgentPolicy.js.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.js.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"msRestUserAgentPolicy.js","sourceRoot":"","sources":["../../../lib/policies/msRestUserAgentPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAE/F,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,MAAM,UAAU,sBAAsB;IACpC,OAAO,SAAS,CAAC,eAAe,CAAC,UAAU,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,uBAAuB;IACrC,IAAM,WAAW,GAAG;QAClB,GAAG,EAAE,MAAM;QACX,KAAK,EAAE,OAAO,CAAC,OAAO;KACvB,CAAC;IAEF,IAAM,MAAM,GAAG;QACb,GAAG,EAAE,IAAI;QACT,KAAK,EAAE,MAAI,EAAE,CAAC,IAAI,EAAE,SAAI,EAAE,CAAC,IAAI,EAAE,SAAI,EAAE,CAAC,OAAO,EAAE,MAAG;KACrD,CAAC;IAEF,OAAO,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;AAC/B,CAAC"}
|
11
node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.browser.d.ts
generated
vendored
Normal file
11
node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.browser.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
import { ProxySettings } from "../serviceClient";
|
||||
import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy";
|
||||
import { HttpOperationResponse } from "../httpOperationResponse";
|
||||
import { WebResourceLike } from "../webResource";
|
||||
export declare function getDefaultProxySettings(_proxyUrl?: string): ProxySettings | undefined;
|
||||
export declare function proxyPolicy(_proxySettings?: ProxySettings): RequestPolicyFactory;
|
||||
export declare class ProxyPolicy extends BaseRequestPolicy {
|
||||
constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike);
|
||||
sendRequest(_request: WebResourceLike): Promise<HttpOperationResponse>;
|
||||
}
|
||||
//# sourceMappingURL=proxyPolicy.browser.d.ts.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.browser.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.browser.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"proxyPolicy.browser.d.ts","sourceRoot":"","sources":["../../../lib/policies/proxyPolicy.browser.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAIjD,wBAAgB,uBAAuB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAErF;AAED,wBAAgB,WAAW,CAAC,cAAc,CAAC,EAAE,aAAa,GAAG,oBAAoB,CAMhF;AAED,qBAAa,WAAY,SAAQ,iBAAiB;gBACpC,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,wBAAwB;IAKjE,WAAW,CAAC,QAAQ,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAG9E"}
|
29
node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.browser.js
generated
vendored
Normal file
29
node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.browser.js
generated
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
import { __extends } from "tslib";
|
||||
import { BaseRequestPolicy, } from "./requestPolicy";
|
||||
var proxyNotSupportedInBrowser = new Error("ProxyPolicy is not supported in browser environment");
|
||||
export function getDefaultProxySettings(_proxyUrl) {
|
||||
return undefined;
|
||||
}
|
||||
export function proxyPolicy(_proxySettings) {
|
||||
return {
|
||||
create: function (_nextPolicy, _options) {
|
||||
throw proxyNotSupportedInBrowser;
|
||||
},
|
||||
};
|
||||
}
|
||||
var ProxyPolicy = /** @class */ (function (_super) {
|
||||
__extends(ProxyPolicy, _super);
|
||||
function ProxyPolicy(nextPolicy, options) {
|
||||
var _this = _super.call(this, nextPolicy, options) || this;
|
||||
throw proxyNotSupportedInBrowser;
|
||||
return _this;
|
||||
}
|
||||
ProxyPolicy.prototype.sendRequest = function (_request) {
|
||||
throw proxyNotSupportedInBrowser;
|
||||
};
|
||||
return ProxyPolicy;
|
||||
}(BaseRequestPolicy));
|
||||
export { ProxyPolicy };
|
||||
//# sourceMappingURL=proxyPolicy.browser.js.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.browser.js.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.browser.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"proxyPolicy.browser.js","sourceRoot":"","sources":["../../../lib/policies/proxyPolicy.browser.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAG/F,OAAO,EACL,iBAAiB,GAIlB,MAAM,iBAAiB,CAAC;AAIzB,IAAM,0BAA0B,GAAG,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;AAEpG,MAAM,UAAU,uBAAuB,CAAC,SAAkB;IACxD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,cAA8B;IACxD,OAAO;QACL,MAAM,EAAE,UAAC,WAA0B,EAAE,QAAkC;YACrE,MAAM,0BAA0B,CAAC;QACnC,CAAC;KACF,CAAC;AACJ,CAAC;AAED;IAAiC,+BAAiB;IAChD,qBAAY,UAAyB,EAAE,OAAiC;QAAxE,YACE,kBAAM,UAAU,EAAE,OAAO,CAAC,SAE3B;QADC,MAAM,0BAA0B,CAAC;;IACnC,CAAC;IAEM,iCAAW,GAAlB,UAAmB,QAAyB;QAC1C,MAAM,0BAA0B,CAAC;IACnC,CAAC;IACH,kBAAC;AAAD,CAAC,AATD,CAAiC,iBAAiB,GASjD"}
|
24
node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.d.ts
generated
vendored
Normal file
24
node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy";
|
||||
import { HttpOperationResponse } from "../httpOperationResponse";
|
||||
import { ProxySettings } from "../serviceClient";
|
||||
import { WebResourceLike } from "../webResource";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const noProxyList: string[];
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare function getEnvironmentValue(name: string): string | undefined;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare function loadNoProxy(): string[];
|
||||
export declare function getDefaultProxySettings(proxyUrl?: string): ProxySettings | undefined;
|
||||
export declare function proxyPolicy(proxySettings?: ProxySettings): RequestPolicyFactory;
|
||||
export declare class ProxyPolicy extends BaseRequestPolicy {
|
||||
proxySettings: ProxySettings;
|
||||
constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, proxySettings: ProxySettings);
|
||||
sendRequest(request: WebResourceLike): Promise<HttpOperationResponse>;
|
||||
}
|
||||
//# sourceMappingURL=proxyPolicy.d.ts.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"proxyPolicy.d.ts","sourceRoot":"","sources":["../../../lib/policies/proxyPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAIjD;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,EAAkB,CAAC;AAGnD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAOpE;AA+CD;;GAEG;AACH,wBAAgB,WAAW,IAAI,MAAM,EAAE,CAUtC;AA4BD,wBAAgB,uBAAuB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAiBpF;AAED,wBAAgB,WAAW,CAAC,aAAa,CAAC,EAAE,aAAa,GAAG,oBAAoB,CAS/E;AAED,qBAAa,WAAY,SAAQ,iBAAiB;IAChD,aAAa,EAAE,aAAa,CAAC;gBAG3B,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,wBAAwB,EACjC,aAAa,EAAE,aAAa;IAMvB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAM7E"}
|
146
node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.js
generated
vendored
Normal file
146
node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.js
generated
vendored
Normal file
|
@ -0,0 +1,146 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
import { __extends } from "tslib";
|
||||
import { BaseRequestPolicy, } from "./requestPolicy";
|
||||
import { Constants } from "../util/constants";
|
||||
import { URLBuilder } from "../url";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export var noProxyList = loadNoProxy();
|
||||
var byPassedList = new Map();
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export function getEnvironmentValue(name) {
|
||||
if (process.env[name]) {
|
||||
return process.env[name];
|
||||
}
|
||||
else if (process.env[name.toLowerCase()]) {
|
||||
return process.env[name.toLowerCase()];
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
function loadEnvironmentProxyValue() {
|
||||
if (!process) {
|
||||
return undefined;
|
||||
}
|
||||
var httpsProxy = getEnvironmentValue(Constants.HTTPS_PROXY);
|
||||
var allProxy = getEnvironmentValue(Constants.ALL_PROXY);
|
||||
var httpProxy = getEnvironmentValue(Constants.HTTP_PROXY);
|
||||
return httpsProxy || allProxy || httpProxy;
|
||||
}
|
||||
// Check whether the host of a given `uri` is in the noProxyList.
|
||||
// If there's a match, any request sent to the same host won't have the proxy settings set.
|
||||
// This implementation is a port of https://github.com/Azure/azure-sdk-for-net/blob/8cca811371159e527159c7eb65602477898683e2/sdk/core/Azure.Core/src/Pipeline/Internal/HttpEnvironmentProxy.cs#L210
|
||||
function isBypassed(uri) {
|
||||
if (noProxyList.length === 0) {
|
||||
return false;
|
||||
}
|
||||
var host = URLBuilder.parse(uri).getHost();
|
||||
if (byPassedList.has(host)) {
|
||||
return byPassedList.get(host);
|
||||
}
|
||||
var isBypassedFlag = false;
|
||||
for (var _i = 0, noProxyList_1 = noProxyList; _i < noProxyList_1.length; _i++) {
|
||||
var pattern = noProxyList_1[_i];
|
||||
if (pattern[0] === ".") {
|
||||
// This should match either domain it self or any subdomain or host
|
||||
// .foo.com will match foo.com it self or *.foo.com
|
||||
if (host.endsWith(pattern)) {
|
||||
isBypassedFlag = true;
|
||||
}
|
||||
else {
|
||||
if (host.length === pattern.length - 1 && host === pattern.slice(1)) {
|
||||
isBypassedFlag = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (host === pattern) {
|
||||
isBypassedFlag = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
byPassedList.set(host, isBypassedFlag);
|
||||
return isBypassedFlag;
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export function loadNoProxy() {
|
||||
var noProxy = getEnvironmentValue(Constants.NO_PROXY);
|
||||
if (noProxy) {
|
||||
return noProxy
|
||||
.split(",")
|
||||
.map(function (item) { return item.trim(); })
|
||||
.filter(function (item) { return item.length; });
|
||||
}
|
||||
return [];
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
function extractAuthFromUrl(url) {
|
||||
var atIndex = url.indexOf("@");
|
||||
if (atIndex === -1) {
|
||||
return { urlWithoutAuth: url };
|
||||
}
|
||||
var schemeIndex = url.indexOf("://");
|
||||
var authStart = schemeIndex !== -1 ? schemeIndex + 3 : 0;
|
||||
var auth = url.substring(authStart, atIndex);
|
||||
var colonIndex = auth.indexOf(":");
|
||||
var hasPassword = colonIndex !== -1;
|
||||
var username = hasPassword ? auth.substring(0, colonIndex) : auth;
|
||||
var password = hasPassword ? auth.substring(colonIndex + 1) : undefined;
|
||||
var urlWithoutAuth = url.substring(0, authStart) + url.substring(atIndex + 1);
|
||||
return {
|
||||
username: username,
|
||||
password: password,
|
||||
urlWithoutAuth: urlWithoutAuth,
|
||||
};
|
||||
}
|
||||
export function getDefaultProxySettings(proxyUrl) {
|
||||
if (!proxyUrl) {
|
||||
proxyUrl = loadEnvironmentProxyValue();
|
||||
if (!proxyUrl) {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
var _a = extractAuthFromUrl(proxyUrl), username = _a.username, password = _a.password, urlWithoutAuth = _a.urlWithoutAuth;
|
||||
var parsedUrl = URLBuilder.parse(urlWithoutAuth);
|
||||
var schema = parsedUrl.getScheme() ? parsedUrl.getScheme() + "://" : "";
|
||||
return {
|
||||
host: schema + parsedUrl.getHost(),
|
||||
port: Number.parseInt(parsedUrl.getPort() || "80"),
|
||||
username: username,
|
||||
password: password,
|
||||
};
|
||||
}
|
||||
export function proxyPolicy(proxySettings) {
|
||||
if (!proxySettings) {
|
||||
proxySettings = getDefaultProxySettings();
|
||||
}
|
||||
return {
|
||||
create: function (nextPolicy, options) {
|
||||
return new ProxyPolicy(nextPolicy, options, proxySettings);
|
||||
},
|
||||
};
|
||||
}
|
||||
var ProxyPolicy = /** @class */ (function (_super) {
|
||||
__extends(ProxyPolicy, _super);
|
||||
function ProxyPolicy(nextPolicy, options, proxySettings) {
|
||||
var _this = _super.call(this, nextPolicy, options) || this;
|
||||
_this.proxySettings = proxySettings;
|
||||
return _this;
|
||||
}
|
||||
ProxyPolicy.prototype.sendRequest = function (request) {
|
||||
if (!request.proxySettings && !isBypassed(request.url)) {
|
||||
request.proxySettings = this.proxySettings;
|
||||
}
|
||||
return this._nextPolicy.sendRequest(request);
|
||||
};
|
||||
return ProxyPolicy;
|
||||
}(BaseRequestPolicy));
|
||||
export { ProxyPolicy };
|
||||
//# sourceMappingURL=proxyPolicy.js.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.js.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"proxyPolicy.js","sourceRoot":"","sources":["../../../lib/policies/proxyPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAE/F,OAAO,EACL,iBAAiB,GAIlB,MAAM,iBAAiB,CAAC;AAIzB,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC;;GAEG;AACH,MAAM,CAAC,IAAM,WAAW,GAAa,WAAW,EAAE,CAAC;AACnD,IAAM,YAAY,GAAyB,IAAI,GAAG,EAAE,CAAC;AAErD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,SAAS,CAAC,OAAO,EAAE;QAClC,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,IAAI,CAAC;QAClD,QAAQ,UAAA;QACR,QAAQ,UAAA;KACT,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,aAA6B;IACvD,IAAI,CAAC,aAAa,EAAE;QAClB,aAAa,GAAG,uBAAuB,EAAE,CAAC;KAC3C;IACD,OAAO;QACL,MAAM,EAAE,UAAC,UAAyB,EAAE,OAAiC;YACnE,OAAO,IAAI,WAAW,CAAC,UAAU,EAAE,OAAO,EAAE,aAAc,CAAC,CAAC;QAC9D,CAAC;KACF,CAAC;AACJ,CAAC;AAED;IAAiC,+BAAiB;IAGhD,qBACE,UAAyB,EACzB,OAAiC,EACjC,aAA4B;QAH9B,YAKE,kBAAM,UAAU,EAAE,OAAO,CAAC,SAE3B;QADC,KAAI,CAAC,aAAa,GAAG,aAAa,CAAC;;IACrC,CAAC;IAEM,iCAAW,GAAlB,UAAmB,OAAwB;QACzC,IAAI,CAAC,OAAO,CAAC,aAAa,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YACtD,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;SAC5C;QACD,OAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC;IACH,kBAAC;AAAD,CAAC,AAlBD,CAAiC,iBAAiB,GAkBjD"}
|
18
node_modules/@azure/ms-rest-js/es/lib/policies/redirectPolicy.d.ts
generated
vendored
Normal file
18
node_modules/@azure/ms-rest-js/es/lib/policies/redirectPolicy.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
import { HttpOperationResponse } from "../httpOperationResponse";
|
||||
import { WebResourceLike } from "../webResource";
|
||||
import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy";
|
||||
/**
|
||||
* Options for how redirect responses are handled.
|
||||
*/
|
||||
export interface RedirectOptions {
|
||||
handleRedirects: boolean;
|
||||
maxRetries?: number;
|
||||
}
|
||||
export declare const DefaultRedirectOptions: RedirectOptions;
|
||||
export declare function redirectPolicy(maximumRetries?: number): RequestPolicyFactory;
|
||||
export declare class RedirectPolicy extends BaseRequestPolicy {
|
||||
readonly maxRetries: number;
|
||||
constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, maxRetries?: number);
|
||||
sendRequest(request: WebResourceLike): Promise<HttpOperationResponse>;
|
||||
}
|
||||
//# sourceMappingURL=redirectPolicy.d.ts.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/redirectPolicy.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/redirectPolicy.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"redirectPolicy.d.ts","sourceRoot":"","sources":["../../../lib/policies/redirectPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,iBAAiB,CAAC;AAEzB;;GAEG;AACH,MAAM,WAAW,eAAe;IAI9B,eAAe,EAAE,OAAO,CAAC;IAMzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,sBAAsB,EAAE,eAGpC,CAAC;AAEF,wBAAgB,cAAc,CAAC,cAAc,SAAK,GAAG,oBAAoB,CAMxE;AAED,qBAAa,cAAe,SAAQ,iBAAiB;IAIjD,QAAQ,CAAC,UAAU;gBAFnB,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,wBAAwB,EACxB,UAAU,SAAK;IAKnB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAK7E"}
|
72
node_modules/@azure/ms-rest-js/es/lib/policies/redirectPolicy.js
generated
vendored
Normal file
72
node_modules/@azure/ms-rest-js/es/lib/policies/redirectPolicy.js
generated
vendored
Normal file
|
@ -0,0 +1,72 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
import { __extends } from "tslib";
|
||||
import { URLBuilder } from "../url";
|
||||
import { BaseRequestPolicy, } from "./requestPolicy";
|
||||
export var DefaultRedirectOptions = {
|
||||
handleRedirects: true,
|
||||
maxRetries: 20,
|
||||
};
|
||||
export function redirectPolicy(maximumRetries) {
|
||||
if (maximumRetries === void 0) { maximumRetries = 20; }
|
||||
return {
|
||||
create: function (nextPolicy, options) {
|
||||
return new RedirectPolicy(nextPolicy, options, maximumRetries);
|
||||
},
|
||||
};
|
||||
}
|
||||
var RedirectPolicy = /** @class */ (function (_super) {
|
||||
__extends(RedirectPolicy, _super);
|
||||
function RedirectPolicy(nextPolicy, options, maxRetries) {
|
||||
if (maxRetries === void 0) { maxRetries = 20; }
|
||||
var _this = _super.call(this, nextPolicy, options) || this;
|
||||
_this.maxRetries = maxRetries;
|
||||
return _this;
|
||||
}
|
||||
RedirectPolicy.prototype.sendRequest = function (request) {
|
||||
var _this = this;
|
||||
return this._nextPolicy
|
||||
.sendRequest(request)
|
||||
.then(function (response) { return handleRedirect(_this, response, 0); });
|
||||
};
|
||||
return RedirectPolicy;
|
||||
}(BaseRequestPolicy));
|
||||
export { RedirectPolicy };
|
||||
function handleRedirect(policy, response, currentRetries) {
|
||||
var request = response.request, status = response.status;
|
||||
var locationHeader = response.headers.get("location");
|
||||
if (locationHeader &&
|
||||
(status === 300 ||
|
||||
(status === 301 && ["GET", "HEAD"].includes(request.method)) ||
|
||||
(status === 302 && ["GET", "POST", "HEAD"].includes(request.method)) ||
|
||||
(status === 303 && "POST" === request.method) ||
|
||||
status === 307) &&
|
||||
((request.redirectLimit !== undefined && currentRetries < request.redirectLimit) ||
|
||||
(request.redirectLimit === undefined && currentRetries < policy.maxRetries))) {
|
||||
var builder = URLBuilder.parse(request.url);
|
||||
builder.setPath(locationHeader);
|
||||
request.url = builder.toString();
|
||||
// POST request with Status code 302 and 303 should be converted into a
|
||||
// redirected GET request if the redirect url is present in the location header
|
||||
// reference: https://tools.ietf.org/html/rfc7231#page-57 && https://fetch.spec.whatwg.org/#http-redirect-fetch
|
||||
if ((status === 302 || status === 303) && request.method === "POST") {
|
||||
request.method = "GET";
|
||||
delete request.body;
|
||||
}
|
||||
return policy._nextPolicy
|
||||
.sendRequest(request)
|
||||
.then(function (res) { return handleRedirect(policy, res, currentRetries + 1); })
|
||||
.then(function (res) { return recordRedirect(res, request.url); });
|
||||
}
|
||||
return Promise.resolve(response);
|
||||
}
|
||||
function recordRedirect(response, redirect) {
|
||||
// This is called as the recursive calls to handleRedirect() unwind,
|
||||
// only record the deepest/last redirect
|
||||
if (!response.redirected) {
|
||||
response.redirected = true;
|
||||
response.url = redirect;
|
||||
}
|
||||
return response;
|
||||
}
|
||||
//# sourceMappingURL=redirectPolicy.js.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/redirectPolicy.js.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/redirectPolicy.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"redirectPolicy.js","sourceRoot":"","sources":["../../../lib/policies/redirectPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAG/F,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,OAAO,EACL,iBAAiB,GAIlB,MAAM,iBAAiB,CAAC;AAkBzB,MAAM,CAAC,IAAM,sBAAsB,GAAoB;IACrD,eAAe,EAAE,IAAI;IACrB,UAAU,EAAE,EAAE;CACf,CAAC;AAEF,MAAM,UAAU,cAAc,CAAC,cAAmB;IAAnB,+BAAA,EAAA,mB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,QAAQ,CAAC;AAClB,CAAC"}
|
71
node_modules/@azure/ms-rest-js/es/lib/policies/requestPolicy.d.ts
generated
vendored
Normal file
71
node_modules/@azure/ms-rest-js/es/lib/policies/requestPolicy.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,71 @@
|
|||
import { HttpOperationResponse } from "../httpOperationResponse";
|
||||
import { HttpPipelineLogger } from "../httpPipelineLogger";
|
||||
import { HttpPipelineLogLevel } from "../httpPipelineLogLevel";
|
||||
import { WebResourceLike } from "../webResource";
|
||||
/**
|
||||
* Creates a new RequestPolicy per-request that uses the provided nextPolicy.
|
||||
*/
|
||||
export declare type RequestPolicyFactory = {
|
||||
create(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike): RequestPolicy;
|
||||
};
|
||||
export interface RequestPolicy {
|
||||
sendRequest(httpRequest: WebResourceLike): Promise<HttpOperationResponse>;
|
||||
}
|
||||
export declare abstract class BaseRequestPolicy implements RequestPolicy {
|
||||
readonly _nextPolicy: RequestPolicy;
|
||||
readonly _options: RequestPolicyOptionsLike;
|
||||
protected constructor(_nextPolicy: RequestPolicy, _options: RequestPolicyOptionsLike);
|
||||
abstract sendRequest(webResource: WebResourceLike): Promise<HttpOperationResponse>;
|
||||
/**
|
||||
* Get whether or not a log with the provided log level should be logged.
|
||||
* @param logLevel The log level of the log that will be logged.
|
||||
* @returns Whether or not a log with the provided log level should be logged.
|
||||
*/
|
||||
shouldLog(logLevel: HttpPipelineLogLevel): boolean;
|
||||
/**
|
||||
* Attempt to log the provided message to the provided logger. If no logger was provided or if
|
||||
* the log level does not meat the logger's threshold, then nothing will be logged.
|
||||
* @param logLevel The log level of this log.
|
||||
* @param message The message of this log.
|
||||
*/
|
||||
log(logLevel: HttpPipelineLogLevel, message: string): void;
|
||||
}
|
||||
/**
|
||||
* Optional properties that can be used when creating a RequestPolicy.
|
||||
*/
|
||||
export interface RequestPolicyOptionsLike {
|
||||
/**
|
||||
* Get whether or not a log with the provided log level should be logged.
|
||||
* @param logLevel The log level of the log that will be logged.
|
||||
* @returns Whether or not a log with the provided log level should be logged.
|
||||
*/
|
||||
shouldLog(logLevel: HttpPipelineLogLevel): boolean;
|
||||
/**
|
||||
* Attempt to log the provided message to the provided logger. If no logger was provided or if
|
||||
* the log level does not meet the logger's threshold, then nothing will be logged.
|
||||
* @param logLevel The log level of this log.
|
||||
* @param message The message of this log.
|
||||
*/
|
||||
log(logLevel: HttpPipelineLogLevel, message: string): void;
|
||||
}
|
||||
/**
|
||||
* Optional properties that can be used when creating a RequestPolicy.
|
||||
*/
|
||||
export declare class RequestPolicyOptions implements RequestPolicyOptionsLike {
|
||||
private _logger?;
|
||||
constructor(_logger?: HttpPipelineLogger | undefined);
|
||||
/**
|
||||
* Get whether or not a log with the provided log level should be logged.
|
||||
* @param logLevel The log level of the log that will be logged.
|
||||
* @returns Whether or not a log with the provided log level should be logged.
|
||||
*/
|
||||
shouldLog(logLevel: HttpPipelineLogLevel): boolean;
|
||||
/**
|
||||
* Attempt to log the provided message to the provided logger. If no logger was provided or if
|
||||
* the log level does not meat the logger's threshold, then nothing will be logged.
|
||||
* @param logLevel The log level of this log.
|
||||
* @param message The message of this log.
|
||||
*/
|
||||
log(logLevel: HttpPipelineLogLevel, message: string): void;
|
||||
}
|
||||
//# sourceMappingURL=requestPolicy.d.ts.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/requestPolicy.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/requestPolicy.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"requestPolicy.d.ts","sourceRoot":"","sources":["../../../lib/policies/requestPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,eAAe,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60
node_modules/@azure/ms-rest-js/es/lib/policies/requestPolicy.js
generated
vendored
Normal file
|
@ -0,0 +1,60 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
import { HttpPipelineLogLevel } from "../httpPipelineLogLevel";
|
||||
var BaseRequestPolicy = /** @class */ (function () {
|
||||
function BaseRequestPolicy(_nextPolicy, _options) {
|
||||
this._nextPolicy = _nextPolicy;
|
||||
this._options = _options;
|
||||
}
|
||||
/**
|
||||
* Get whether or not a log with the provided log level should be logged.
|
||||
* @param logLevel The log level of the log that will be logged.
|
||||
* @returns Whether or not a log with the provided log level should be logged.
|
||||
*/
|
||||
BaseRequestPolicy.prototype.shouldLog = function (logLevel) {
|
||||
return this._options.shouldLog(logLevel);
|
||||
};
|
||||
/**
|
||||
* Attempt to log the provided message to the provided logger. If no logger was provided or if
|
||||
* the log level does not meat the logger's threshold, then nothing will be logged.
|
||||
* @param logLevel The log level of this log.
|
||||
* @param message The message of this log.
|
||||
*/
|
||||
BaseRequestPolicy.prototype.log = function (logLevel, message) {
|
||||
this._options.log(logLevel, message);
|
||||
};
|
||||
return BaseRequestPolicy;
|
||||
}());
|
||||
export { BaseRequestPolicy };
|
||||
/**
|
||||
* Optional properties that can be used when creating a RequestPolicy.
|
||||
*/
|
||||
var RequestPolicyOptions = /** @class */ (function () {
|
||||
function RequestPolicyOptions(_logger) {
|
||||
this._logger = _logger;
|
||||
}
|
||||
/**
|
||||
* Get whether or not a log with the provided log level should be logged.
|
||||
* @param logLevel The log level of the log that will be logged.
|
||||
* @returns Whether or not a log with the provided log level should be logged.
|
||||
*/
|
||||
RequestPolicyOptions.prototype.shouldLog = function (logLevel) {
|
||||
return (!!this._logger &&
|
||||
logLevel !== HttpPipelineLogLevel.OFF &&
|
||||
logLevel <= this._logger.minimumLogLevel);
|
||||
};
|
||||
/**
|
||||
* Attempt to log the provided message to the provided logger. If no logger was provided or if
|
||||
* the log level does not meat the logger's threshold, then nothing will be logged.
|
||||
* @param logLevel The log level of this log.
|
||||
* @param message The message of this log.
|
||||
*/
|
||||
RequestPolicyOptions.prototype.log = function (logLevel, message) {
|
||||
if (this._logger && this.shouldLog(logLevel)) {
|
||||
this._logger.log(logLevel, message);
|
||||
}
|
||||
};
|
||||
return RequestPolicyOptions;
|
||||
}());
|
||||
export { RequestPolicyOptions };
|
||||
//# sourceMappingURL=requestPolicy.js.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/requestPolicy.js.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/requestPolicy.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"requestPolicy.js","sourceRoot":"","sources":["../../../lib/policies/requestPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAI/F,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAc/D;IACE,2BACW,WAA0B,EAC1B,QAAkC;QADlC,gBAAW,GAAX,WAAW,CAAe;QAC1B,aAAQ,GAAR,QAAQ,CAA0B;IAC1C,CAAC;IAIJ;;;;OAIG;IACI,qCAAS,GAAhB,UAAiB,QAA8B;QAC7C,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC3C,CAAC;IAED;;;;;OAKG;IACI,+BAAG,GAAV,UAAW,QAA8B,EAAE,OAAe;QACxD,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC;IACH,wBAAC;AAAD,CAAC,AA1BD,IA0BC;;AAsBD;;GAEG;AACH;IACE,8BAAoB,OAA4B;QAA5B,YAAO,GAAP,OAAO,CAAqB;IAAG,CAAC;IAEpD;;;;OAIG;IACI,wCAAS,GAAhB,UAAiB,QAA8B;QAC7C,OAAO,CACL,CAAC,CAAC,IAAI,CAAC,OAAO;YACd,QAAQ,KAAK,oBAAoB,CAAC,GAAG;YACrC,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC,eAAe,CACzC,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACI,kCAAG,GAAV,UAAW,QAA8B,EAAE,OAAe;QACxD,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE;YAC5C,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;SACrC;IACH,CAAC;IACH,2BAAC;AAAD,CAAC,AA3BD,IA2BC"}
|
10
node_modules/@azure/ms-rest-js/es/lib/policies/rpRegistrationPolicy.d.ts
generated
vendored
Normal file
10
node_modules/@azure/ms-rest-js/es/lib/policies/rpRegistrationPolicy.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
import { HttpOperationResponse } from "../httpOperationResponse";
|
||||
import { WebResourceLike } from "../webResource";
|
||||
import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy";
|
||||
export declare function rpRegistrationPolicy(retryTimeout?: number): RequestPolicyFactory;
|
||||
export declare class RPRegistrationPolicy extends BaseRequestPolicy {
|
||||
readonly _retryTimeout: number;
|
||||
constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, _retryTimeout?: number);
|
||||
sendRequest(request: WebResourceLike): Promise<HttpOperationResponse>;
|
||||
}
|
||||
//# sourceMappingURL=rpRegistrationPolicy.d.ts.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/rpRegistrationPolicy.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/rpRegistrationPolicy.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"rpRegistrationPolicy.d.ts","sourceRoot":"","sources":["../../../lib/policies/rpRegistrationPolicy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,iBAAiB,CAAC;AAEzB,wBAAgB,oBAAoB,CAAC,YAAY,SAAK,GAAG,oBAAoB,CAM5E;AAED,qBAAa,oBAAqB,SAAQ,iBAAiB;IAIvD,QAAQ,CAAC,aAAa;gBAFtB,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,wBAAwB,EACxB,aAAa,SAAK;IAKtB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAK7E"}
|
163
node_modules/@azure/ms-rest-js/es/lib/policies/rpRegistrationPolicy.js
generated
vendored
Normal file
163
node_modules/@azure/ms-rest-js/es/lib/policies/rpRegistrationPolicy.js
generated
vendored
Normal file
|
@ -0,0 +1,163 @@
|
|||
import { __extends } from "tslib";
|
||||
import * as utils from "../util/utils";
|
||||
import { BaseRequestPolicy, } from "./requestPolicy";
|
||||
export function rpRegistrationPolicy(retryTimeout) {
|
||||
if (retryTimeout === void 0) { retryTimeout = 30; }
|
||||
return {
|
||||
create: function (nextPolicy, options) {
|
||||
return new RPRegistrationPolicy(nextPolicy, options, retryTimeout);
|
||||
},
|
||||
};
|
||||
}
|
||||
var RPRegistrationPolicy = /** @class */ (function (_super) {
|
||||
__extends(RPRegistrationPolicy, _super);
|
||||
function RPRegistrationPolicy(nextPolicy, options, _retryTimeout) {
|
||||
if (_retryTimeout === void 0) { _retryTimeout = 30; }
|
||||
var _this = _super.call(this, nextPolicy, options) || this;
|
||||
_this._retryTimeout = _retryTimeout;
|
||||
return _this;
|
||||
}
|
||||
RPRegistrationPolicy.prototype.sendRequest = function (request) {
|
||||
var _this = this;
|
||||
return this._nextPolicy
|
||||
.sendRequest(request.clone())
|
||||
.then(function (response) { return registerIfNeeded(_this, request, response); });
|
||||
};
|
||||
return RPRegistrationPolicy;
|
||||
}(BaseRequestPolicy));
|
||||
export { RPRegistrationPolicy };
|
||||
function registerIfNeeded(policy, request, response) {
|
||||
if (response.status === 409) {
|
||||
var rpName = checkRPNotRegisteredError(response.bodyAsText);
|
||||
if (rpName) {
|
||||
var urlPrefix = extractSubscriptionUrl(request.url);
|
||||
return (registerRP(policy, urlPrefix, rpName, request)
|
||||
// Autoregistration of ${provider} failed for some reason. We will not return this error
|
||||
// instead will return the initial response with 409 status code back to the user.
|
||||
// do nothing here as we are returning the original response at the end of this method.
|
||||
.catch(function () { return false; })
|
||||
.then(function (registrationStatus) {
|
||||
if (registrationStatus) {
|
||||
// Retry the original request. We have to change the x-ms-client-request-id
|
||||
// otherwise Azure endpoint will return the initial 409 (cached) response.
|
||||
request.headers.set("x-ms-client-request-id", utils.generateUuid());
|
||||
return policy._nextPolicy.sendRequest(request.clone());
|
||||
}
|
||||
return response;
|
||||
}));
|
||||
}
|
||||
}
|
||||
return Promise.resolve(response);
|
||||
}
|
||||
/**
|
||||
* Reuses the headers of the original request and url (if specified).
|
||||
* @param {WebResourceLike} originalRequest The original request
|
||||
* @param {boolean} reuseUrlToo Should the url from the original request be reused as well. Default false.
|
||||
* @returns {object} A new request object with desired headers.
|
||||
*/
|
||||
function getRequestEssentials(originalRequest, reuseUrlToo) {
|
||||
if (reuseUrlToo === void 0) { reuseUrlToo = false; }
|
||||
var reqOptions = originalRequest.clone();
|
||||
if (reuseUrlToo) {
|
||||
reqOptions.url = originalRequest.url;
|
||||
}
|
||||
// We have to change the x-ms-client-request-id otherwise Azure endpoint
|
||||
// will return the initial 409 (cached) response.
|
||||
reqOptions.headers.set("x-ms-client-request-id", utils.generateUuid());
|
||||
// Set content-type to application/json
|
||||
reqOptions.headers.set("Content-Type", "application/json; charset=utf-8");
|
||||
return reqOptions;
|
||||
}
|
||||
/**
|
||||
* Validates the error code and message associated with 409 response status code. If it matches to that of
|
||||
* RP not registered then it returns the name of the RP else returns undefined.
|
||||
* @param {string} body The response body received after making the original request.
|
||||
* @returns {string} The name of the RP if condition is satisfied else undefined.
|
||||
*/
|
||||
function checkRPNotRegisteredError(body) {
|
||||
var result, responseBody;
|
||||
if (body) {
|
||||
try {
|
||||
responseBody = JSON.parse(body);
|
||||
}
|
||||
catch (err) {
|
||||
// do nothing;
|
||||
}
|
||||
if (responseBody &&
|
||||
responseBody.error &&
|
||||
responseBody.error.message &&
|
||||
responseBody.error.code &&
|
||||
responseBody.error.code === "MissingSubscriptionRegistration") {
|
||||
var matchRes = responseBody.error.message.match(/.*'(.*)'/i);
|
||||
if (matchRes) {
|
||||
result = matchRes.pop();
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* Extracts the first part of the URL, just after subscription:
|
||||
* https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/
|
||||
* @param {string} url The original request url
|
||||
* @returns {string} The url prefix as explained above.
|
||||
*/
|
||||
function extractSubscriptionUrl(url) {
|
||||
var result;
|
||||
var matchRes = url.match(/.*\/subscriptions\/[a-f0-9-]+\//gi);
|
||||
if (matchRes && matchRes[0]) {
|
||||
result = matchRes[0];
|
||||
}
|
||||
else {
|
||||
throw new Error("Unable to extract subscriptionId from the given url - " + url + ".");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* Registers the given provider.
|
||||
* @param {RPRegistrationPolicy} policy The RPRegistrationPolicy this function is being called against.
|
||||
* @param {string} urlPrefix https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/
|
||||
* @param {string} provider The provider name to be registered.
|
||||
* @param {WebResourceLike} originalRequest The original request sent by the user that returned a 409 response
|
||||
* with a message that the provider is not registered.
|
||||
* @param {registrationCallback} callback The callback that handles the RP registration
|
||||
*/
|
||||
function registerRP(policy, urlPrefix, provider, originalRequest) {
|
||||
var postUrl = urlPrefix + "providers/" + provider + "/register?api-version=2016-02-01";
|
||||
var getUrl = urlPrefix + "providers/" + provider + "?api-version=2016-02-01";
|
||||
var reqOptions = getRequestEssentials(originalRequest);
|
||||
reqOptions.method = "POST";
|
||||
reqOptions.url = postUrl;
|
||||
return policy._nextPolicy.sendRequest(reqOptions).then(function (response) {
|
||||
if (response.status !== 200) {
|
||||
throw new Error("Autoregistration of " + provider + " failed. Please try registering manually.");
|
||||
}
|
||||
return getRegistrationStatus(policy, getUrl, originalRequest);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Polls the registration status of the provider that was registered. Polling happens at an interval of 30 seconds.
|
||||
* Polling will happen till the registrationState property of the response body is "Registered".
|
||||
* @param {RPRegistrationPolicy} policy The RPRegistrationPolicy this function is being called against.
|
||||
* @param {string} url The request url for polling
|
||||
* @param {WebResourceLike} originalRequest The original request sent by the user that returned a 409 response
|
||||
* with a message that the provider is not registered.
|
||||
* @returns {Promise<boolean>} True if RP Registration is successful.
|
||||
*/
|
||||
function getRegistrationStatus(policy, url, originalRequest) {
|
||||
var reqOptions = getRequestEssentials(originalRequest);
|
||||
reqOptions.url = url;
|
||||
reqOptions.method = "GET";
|
||||
return policy._nextPolicy.sendRequest(reqOptions).then(function (res) {
|
||||
var obj = res.parsedBody;
|
||||
if (res.parsedBody && obj.registrationState && obj.registrationState === "Registered") {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return utils
|
||||
.delay(policy._retryTimeout * 1000)
|
||||
.then(function () { return getRegistrationStatus(policy, url, originalRequest); });
|
||||
}
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=rpRegistrationPolicy.js.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/rpRegistrationPolicy.js.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/rpRegistrationPolicy.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"rpRegistrationPolicy.js","sourceRoot":"","sources":["../../../lib/policies/rpRegistrationPolicy.ts"],"names":[],"mappings":";AAGA,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AAEvC,OAAO,EACL,iBAAiB,GAIlB,MAAM,iBA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AAe,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,qBAAqB,CAC5B,MAA4B,EAC5B,GAAW,EACX,eAAgC;IAEhC,IAAM,UAAU,GAAQ,oBAAoB,CAAC,eAAe,CAAC,CAAC;IAC9D,UAAU,CAAC,GAAG,GAAG,GAAG,CAAC;IACrB,UAAU,CAAC,MAAM,GAAG,KAAK,CAAC;IAE1B,OAAO,MAAM,CAAC,WAAW,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,UAAC,GAAG;QACzD,IAAM,GAAG,GAAG,GAAG,CAAC,UAAiB,CAAC;QAClC,IAAI,GAAG,CAAC,UAAU,IAAI,GAAG,CAAC,iBAAiB,IAAI,GAAG,CAAC,iBAAiB,KAAK,YAAY,EAAE;YACrF,OAAO,IAAI,CAAC;SACb;aAAM;YACL,OAAO,KAAK;iBACT,KAAK,CAAC,MAAM,CAAC,aAAa,GAAG,IAAI,CAAC;iBAClC,IAAI,CAAC,cAAM,OAAA,qBAAqB,CAAC,MAAM,EAAE,GAAG,EAAE,eAAe,CAAC,EAAnD,CAAmD,CAAC,CAAC;SACpE;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
12
node_modules/@azure/ms-rest-js/es/lib/policies/signingPolicy.d.ts
generated
vendored
Normal file
12
node_modules/@azure/ms-rest-js/es/lib/policies/signingPolicy.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
import { ServiceClientCredentials } from "../credentials/serviceClientCredentials";
|
||||
import { HttpOperationResponse } from "../httpOperationResponse";
|
||||
import { WebResourceLike } from "../webResource";
|
||||
import { BaseRequestPolicy, RequestPolicyFactory, RequestPolicy, RequestPolicyOptionsLike } from "./requestPolicy";
|
||||
export declare function signingPolicy(authenticationProvider: ServiceClientCredentials): RequestPolicyFactory;
|
||||
export declare class SigningPolicy extends BaseRequestPolicy {
|
||||
authenticationProvider: ServiceClientCredentials;
|
||||
constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, authenticationProvider: ServiceClientCredentials);
|
||||
signRequest(request: WebResourceLike): Promise<WebResourceLike>;
|
||||
sendRequest(request: WebResourceLike): Promise<HttpOperationResponse>;
|
||||
}
|
||||
//# sourceMappingURL=signingPolicy.d.ts.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/signingPolicy.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/signingPolicy.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"signingPolicy.d.ts","sourceRoot":"","sources":["../../../lib/policies/signingPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,EACb,wBAAwB,EACzB,MAAM,iBAAiB,CAAC;AAEzB,wBAAgB,aAAa,CAC3B,sBAAsB,EAAE,wBAAwB,GAC/C,oBAAoB,CAMtB;AAED,qBAAa,aAAc,SAAQ,iBAAiB;IAIzC,sBAAsB,EAAE,wBAAwB;gBAFvD,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,wBAAwB,EAC1B,sBAAsB,EAAE,wBAAwB;IAKzD,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IAIxD,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAK7E"}
|
31
node_modules/@azure/ms-rest-js/es/lib/policies/signingPolicy.js
generated
vendored
Normal file
31
node_modules/@azure/ms-rest-js/es/lib/policies/signingPolicy.js
generated
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
import { __extends } from "tslib";
|
||||
import { BaseRequestPolicy, } from "./requestPolicy";
|
||||
export function signingPolicy(authenticationProvider) {
|
||||
return {
|
||||
create: function (nextPolicy, options) {
|
||||
return new SigningPolicy(nextPolicy, options, authenticationProvider);
|
||||
},
|
||||
};
|
||||
}
|
||||
var SigningPolicy = /** @class */ (function (_super) {
|
||||
__extends(SigningPolicy, _super);
|
||||
function SigningPolicy(nextPolicy, options, authenticationProvider) {
|
||||
var _this = _super.call(this, nextPolicy, options) || this;
|
||||
_this.authenticationProvider = authenticationProvider;
|
||||
return _this;
|
||||
}
|
||||
SigningPolicy.prototype.signRequest = function (request) {
|
||||
return this.authenticationProvider.signRequest(request);
|
||||
};
|
||||
SigningPolicy.prototype.sendRequest = function (request) {
|
||||
var _this = this;
|
||||
return this.signRequest(request).then(function (nextRequest) {
|
||||
return _this._nextPolicy.sendRequest(nextRequest);
|
||||
});
|
||||
};
|
||||
return SigningPolicy;
|
||||
}(BaseRequestPolicy));
|
||||
export { SigningPolicy };
|
||||
//# sourceMappingURL=signingPolicy.js.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/signingPolicy.js.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/signingPolicy.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"signingPolicy.js","sourceRoot":"","sources":["../../../lib/policies/signingPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAK/F,OAAO,EACL,iBAAiB,GAIlB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,UAAU,aAAa,CAC3B,sBAAgD;IAEhD,OAAO;QACL,MAAM,EAAE,UAAC,UAAyB,EAAE,OAAiC;YACnE,OAAO,IAAI,aAAa,CAAC,UAAU,EAAE,OAAO,EAAE,sBAAsB,CAAC,CAAC;QACxE,CAAC;KACF,CAAC;AACJ,CAAC;AAED;IAAmC,iCAAiB;IAClD,uBACE,UAAyB,EACzB,OAAiC,EAC1B,sBAAgD;QAHzD,YAKE,kBAAM,UAAU,EAAE,OAAO,CAAC,SAC3B;QAHQ,4BAAsB,GAAtB,sBAAsB,CAA0B;;IAGzD,CAAC;IAED,mCAAW,GAAX,UAAY,OAAwB;QAClC,OAAO,IAAI,CAAC,sBAAsB,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC1D,CAAC;IAEM,mCAAW,GAAlB,UAAmB,OAAwB;QAA3C,iBAIC;QAHC,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,UAAC,WAAW;YAChD,OAAA,KAAI,CAAC,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC;QAAzC,CAAyC,CAC1C,CAAC;IACJ,CAAC;IACH,oBAAC;AAAD,CAAC,AAlBD,CAAmC,iBAAiB,GAkBnD"}
|
37
node_modules/@azure/ms-rest-js/es/lib/policies/systemErrorRetryPolicy.d.ts
generated
vendored
Normal file
37
node_modules/@azure/ms-rest-js/es/lib/policies/systemErrorRetryPolicy.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
import { HttpOperationResponse } from "../httpOperationResponse";
|
||||
import { WebResourceLike } from "../webResource";
|
||||
import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy";
|
||||
export interface RetryData {
|
||||
retryCount: number;
|
||||
retryInterval: number;
|
||||
error?: RetryError;
|
||||
}
|
||||
export interface RetryError extends Error {
|
||||
message: string;
|
||||
code?: string;
|
||||
innerError?: RetryError;
|
||||
}
|
||||
export declare function systemErrorRetryPolicy(retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number): RequestPolicyFactory;
|
||||
/**
|
||||
* @class
|
||||
* Instantiates a new "ExponentialRetryPolicyFilter" instance.
|
||||
*
|
||||
* @constructor
|
||||
* @param {number} retryCount The client retry count.
|
||||
* @param {number} retryInterval The client retry interval, in milliseconds.
|
||||
* @param {number} minRetryInterval The minimum retry interval, in milliseconds.
|
||||
* @param {number} maxRetryInterval The maximum retry interval, in milliseconds.
|
||||
*/
|
||||
export declare class SystemErrorRetryPolicy extends BaseRequestPolicy {
|
||||
retryCount: number;
|
||||
retryInterval: number;
|
||||
minRetryInterval: number;
|
||||
maxRetryInterval: number;
|
||||
DEFAULT_CLIENT_RETRY_INTERVAL: number;
|
||||
DEFAULT_CLIENT_RETRY_COUNT: number;
|
||||
DEFAULT_CLIENT_MAX_RETRY_INTERVAL: number;
|
||||
DEFAULT_CLIENT_MIN_RETRY_INTERVAL: number;
|
||||
constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number);
|
||||
sendRequest(request: WebResourceLike): Promise<HttpOperationResponse>;
|
||||
}
|
||||
//# sourceMappingURL=systemErrorRetryPolicy.d.ts.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/systemErrorRetryPolicy.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/systemErrorRetryPolicy.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"systemErrorRetryPolicy.d.ts","sourceRoot":"","sources":["../../../lib/policies/systemErrorRetryPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,SAAS;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AAED,MAAM,WAAW,UAAW,SAAQ,KAAK;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,wBAAgB,sBAAsB,CACpC,UAAU,CAAC,EAAE,MAAM,EACnB,aAAa,CAAC,EAAE,MAAM,EACtB,gBAAgB,CAAC,EAAE,MAAM,EACzB,gBAAgB,CAAC,EAAE,MAAM,GACxB,oBAAoB,CAatB;AAED;;;;;;;;;GASG;AACH,qBAAa,sBAAuB,SAAQ,iBAAiB;IAC3D,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,6BAA6B,SAAa;IAC1C,0BAA0B,SAAK;IAC/B,iCAAiC,SAAa;IAC9C,iCAAiC,SAAY;gBAG3C,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,wBAAwB,EACjC,UAAU,CAAC,EAAE,MAAM,EACnB,aAAa,CAAC,EAAE,MAAM,EACtB,gBAAgB,CAAC,EAAE,MAAM,EACzB,gBAAgB,CAAC,EAAE,MAAM;IAgBpB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAK7E"}
|
135
node_modules/@azure/ms-rest-js/es/lib/policies/systemErrorRetryPolicy.js
generated
vendored
Normal file
135
node_modules/@azure/ms-rest-js/es/lib/policies/systemErrorRetryPolicy.js
generated
vendored
Normal file
|
@ -0,0 +1,135 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
import { __awaiter, __extends, __generator } from "tslib";
|
||||
import * as utils from "../util/utils";
|
||||
import { BaseRequestPolicy, } from "./requestPolicy";
|
||||
export function systemErrorRetryPolicy(retryCount, retryInterval, minRetryInterval, maxRetryInterval) {
|
||||
return {
|
||||
create: function (nextPolicy, options) {
|
||||
return new SystemErrorRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval);
|
||||
},
|
||||
};
|
||||
}
|
||||
/**
|
||||
* @class
|
||||
* Instantiates a new "ExponentialRetryPolicyFilter" instance.
|
||||
*
|
||||
* @constructor
|
||||
* @param {number} retryCount The client retry count.
|
||||
* @param {number} retryInterval The client retry interval, in milliseconds.
|
||||
* @param {number} minRetryInterval The minimum retry interval, in milliseconds.
|
||||
* @param {number} maxRetryInterval The maximum retry interval, in milliseconds.
|
||||
*/
|
||||
var SystemErrorRetryPolicy = /** @class */ (function (_super) {
|
||||
__extends(SystemErrorRetryPolicy, _super);
|
||||
function SystemErrorRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval) {
|
||||
var _this = _super.call(this, nextPolicy, options) || this;
|
||||
_this.DEFAULT_CLIENT_RETRY_INTERVAL = 1000 * 30;
|
||||
_this.DEFAULT_CLIENT_RETRY_COUNT = 3;
|
||||
_this.DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 90;
|
||||
_this.DEFAULT_CLIENT_MIN_RETRY_INTERVAL = 1000 * 3;
|
||||
_this.retryCount = typeof retryCount === "number" ? retryCount : _this.DEFAULT_CLIENT_RETRY_COUNT;
|
||||
_this.retryInterval =
|
||||
typeof retryInterval === "number" ? retryInterval : _this.DEFAULT_CLIENT_RETRY_INTERVAL;
|
||||
_this.minRetryInterval =
|
||||
typeof minRetryInterval === "number"
|
||||
? minRetryInterval
|
||||
: _this.DEFAULT_CLIENT_MIN_RETRY_INTERVAL;
|
||||
_this.maxRetryInterval =
|
||||
typeof maxRetryInterval === "number"
|
||||
? maxRetryInterval
|
||||
: _this.DEFAULT_CLIENT_MAX_RETRY_INTERVAL;
|
||||
return _this;
|
||||
}
|
||||
SystemErrorRetryPolicy.prototype.sendRequest = function (request) {
|
||||
var _this = this;
|
||||
return this._nextPolicy
|
||||
.sendRequest(request.clone())
|
||||
.catch(function (error) { return retry(_this, request, error.response, error); });
|
||||
};
|
||||
return SystemErrorRetryPolicy;
|
||||
}(BaseRequestPolicy));
|
||||
export { SystemErrorRetryPolicy };
|
||||
/**
|
||||
* Determines if the operation should be retried and how long to wait until the next retry.
|
||||
*
|
||||
* @param {number} statusCode The HTTP status code.
|
||||
* @param {RetryData} retryData The retry data.
|
||||
* @return {boolean} True if the operation qualifies for a retry; false otherwise.
|
||||
*/
|
||||
function shouldRetry(policy, retryData) {
|
||||
var currentCount;
|
||||
if (!retryData) {
|
||||
throw new Error("retryData for the SystemErrorRetryPolicyFilter cannot be null.");
|
||||
}
|
||||
else {
|
||||
currentCount = retryData && retryData.retryCount;
|
||||
}
|
||||
return currentCount < policy.retryCount;
|
||||
}
|
||||
/**
|
||||
* Updates the retry data for the next attempt.
|
||||
*
|
||||
* @param {RetryData} retryData The retry data.
|
||||
* @param {object} err The operation"s error, if any.
|
||||
*/
|
||||
function updateRetryData(policy, retryData, err) {
|
||||
if (!retryData) {
|
||||
retryData = {
|
||||
retryCount: 0,
|
||||
retryInterval: 0,
|
||||
};
|
||||
}
|
||||
if (err) {
|
||||
if (retryData.error) {
|
||||
err.innerError = retryData.error;
|
||||
}
|
||||
retryData.error = err;
|
||||
}
|
||||
// Adjust retry count
|
||||
retryData.retryCount++;
|
||||
// Adjust retry interval
|
||||
var incrementDelta = Math.pow(2, retryData.retryCount) - 1;
|
||||
var boundedRandDelta = policy.retryInterval * 0.8 + Math.floor(Math.random() * (policy.retryInterval * 0.4));
|
||||
incrementDelta *= boundedRandDelta;
|
||||
retryData.retryInterval = Math.min(policy.minRetryInterval + incrementDelta, policy.maxRetryInterval);
|
||||
return retryData;
|
||||
}
|
||||
function retry(policy, request, operationResponse, err, retryData) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var error_1;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
retryData = updateRetryData(policy, retryData, err);
|
||||
if (!(err &&
|
||||
err.code &&
|
||||
shouldRetry(policy, retryData) &&
|
||||
(err.code === "ETIMEDOUT" ||
|
||||
err.code === "ESOCKETTIMEDOUT" ||
|
||||
err.code === "ECONNREFUSED" ||
|
||||
err.code === "ECONNRESET" ||
|
||||
err.code === "ENOENT"))) return [3 /*break*/, 5];
|
||||
_a.label = 1;
|
||||
case 1:
|
||||
_a.trys.push([1, 3, , 4]);
|
||||
return [4 /*yield*/, utils.delay(retryData.retryInterval)];
|
||||
case 2:
|
||||
_a.sent();
|
||||
return [2 /*return*/, policy._nextPolicy.sendRequest(request.clone())];
|
||||
case 3:
|
||||
error_1 = _a.sent();
|
||||
return [2 /*return*/, retry(policy, request, operationResponse, error_1, retryData)];
|
||||
case 4: return [3 /*break*/, 6];
|
||||
case 5:
|
||||
if (err) {
|
||||
// If the operation failed in the end, return all errors instead of just the last one
|
||||
return [2 /*return*/, Promise.reject(retryData.error)];
|
||||
}
|
||||
return [2 /*return*/, operationResponse];
|
||||
case 6: return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=systemErrorRetryPolicy.js.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/systemErrorRetryPolicy.js.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/systemErrorRetryPolicy.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"systemErrorRetryPolicy.js","sourceRoot":"","sources":["../../../lib/policies/systemErrorRetryPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAG/F,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AAEvC,OAAO,EACL,iBAAiB,GAIlB,MAAM,iBAAiB,CAAC;AAczB,MAAM,UAAU,sBAAsB,CACpC,UAAmB,EACnB,aAAsB,EACtB,gBAAyB,EACzB,gBAAyB;IAEzB,OAAO;QACL,MAAM,EAAE,UAAC,UAAyB,EAAE,OAAiC;YACnE,OAAO,IAAI,sBAAsB,CAC/B,UAAU,EACV,OAAO,EACP,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,gBA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AK,CAClB,MAA8B,EAC9B,OAAwB,EACxB,iBAAwC,EACxC,GAAgB,EAChB,SAAqB;;;;;;oBAErB,SAAS,GAAG,eAAe,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;yBAElD,CAAA,GAAG;wBACH,GAAG,CAAC,IAAI;wBACR,WAAW,CAAC,MAAM,EAAE,SAAS,CAAC;wBAC9B,CAAC,GAAG,CAAC,IAAI,KAAK,WAAW;4BACvB,GAAG,CAAC,IAAI,KAAK,iBAAiB;4BAC9B,GAAG,CAAC,IAAI,KAAK,cAAc;4BAC3B,GAAG,CAAC,IAAI,KAAK,YAAY;4BACzB,GAAG,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAA,EAPxB,wBAOwB;;;;oBAItB,qBAAM,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC,EAAA;;oBAA1C,SAA0C,CAAC;oBAC3C,sBAAO,MAAM,CAAC,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,EAAC;;;oBAEvD,sBAAO,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,iBAAiB,EAAE,OAAK,EAAE,SAAS,CAAC,EAAC;;;oBAGrE,IAAI,GAAG,EAAE;wBACP,qFAAqF;wBACrF,sBAAO,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,EAAC;qBACxC;oBACD,sBAAO,iBAAiB,EAAC;;;;;CAE5B"}
|
28
node_modules/@azure/ms-rest-js/es/lib/policies/throttlingRetryPolicy.d.ts
generated
vendored
Normal file
28
node_modules/@azure/ms-rest-js/es/lib/policies/throttlingRetryPolicy.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
import { BaseRequestPolicy, RequestPolicy, RequestPolicyOptionsLike, RequestPolicyFactory } from "./requestPolicy";
|
||||
import { WebResourceLike } from "../webResource";
|
||||
import { HttpOperationResponse } from "../httpOperationResponse";
|
||||
/**
|
||||
* Options that control how to retry on response status code 429.
|
||||
*/
|
||||
export interface ThrottlingRetryOptions {
|
||||
/**
|
||||
* The maximum number of retry attempts. Defaults to 3.
|
||||
*/
|
||||
maxRetries?: number;
|
||||
}
|
||||
export declare function throttlingRetryPolicy(maxRetries?: number): RequestPolicyFactory;
|
||||
/**
|
||||
* To learn more, please refer to
|
||||
* https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits,
|
||||
* https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits and
|
||||
* https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors
|
||||
*/
|
||||
export declare class ThrottlingRetryPolicy extends BaseRequestPolicy {
|
||||
private retryLimit;
|
||||
constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, retryLimit: number);
|
||||
sendRequest(httpRequest: WebResourceLike): Promise<HttpOperationResponse>;
|
||||
private retry;
|
||||
static parseRetryAfterHeader(headerValue: string): number | undefined;
|
||||
static parseDateRetryAfterHeader(headerValue: string): number | undefined;
|
||||
}
|
||||
//# sourceMappingURL=throttlingRetryPolicy.d.ts.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/throttlingRetryPolicy.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/throttlingRetryPolicy.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"throttlingRetryPolicy.d.ts","sourceRoot":"","sources":["../../../lib/policies/throttlingRetryPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAOjE;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,qBAAqB,CACnC,UAAU,GAAE,MAA4B,GACvC,oBAAoB,CAMtB;AAED;;;;;GAKG;AACH,qBAAa,qBAAsB,SAAQ,iBAAiB;IAC1D,OAAO,CAAC,UAAU,CAAS;gBAEf,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,wBAAwB,EAAE,UAAU,EAAE,MAAM;IAK/E,WAAW,CAAC,WAAW,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;YAMxE,KAAK;WA2BL,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;WAS9D,yBAAyB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;CAWjF"}
|
88
node_modules/@azure/ms-rest-js/es/lib/policies/throttlingRetryPolicy.js
generated
vendored
Normal file
88
node_modules/@azure/ms-rest-js/es/lib/policies/throttlingRetryPolicy.js
generated
vendored
Normal file
|
@ -0,0 +1,88 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
import { __awaiter, __extends, __generator } from "tslib";
|
||||
import { BaseRequestPolicy, } from "./requestPolicy";
|
||||
import { Constants } from "../util/constants";
|
||||
import { delay } from "../util/utils";
|
||||
var StatusCodes = Constants.HttpConstants.StatusCodes;
|
||||
var DEFAULT_RETRY_COUNT = 3;
|
||||
export function throttlingRetryPolicy(maxRetries) {
|
||||
if (maxRetries === void 0) { maxRetries = DEFAULT_RETRY_COUNT; }
|
||||
return {
|
||||
create: function (nextPolicy, options) {
|
||||
return new ThrottlingRetryPolicy(nextPolicy, options, maxRetries);
|
||||
},
|
||||
};
|
||||
}
|
||||
/**
|
||||
* To learn more, please refer to
|
||||
* https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits,
|
||||
* https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits and
|
||||
* https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors
|
||||
*/
|
||||
var ThrottlingRetryPolicy = /** @class */ (function (_super) {
|
||||
__extends(ThrottlingRetryPolicy, _super);
|
||||
function ThrottlingRetryPolicy(nextPolicy, options, retryLimit) {
|
||||
var _this = _super.call(this, nextPolicy, options) || this;
|
||||
_this.retryLimit = retryLimit;
|
||||
return _this;
|
||||
}
|
||||
ThrottlingRetryPolicy.prototype.sendRequest = function (httpRequest) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var _this = this;
|
||||
return __generator(this, function (_a) {
|
||||
return [2 /*return*/, this._nextPolicy.sendRequest(httpRequest.clone()).then(function (response) {
|
||||
return _this.retry(httpRequest, response, 0);
|
||||
})];
|
||||
});
|
||||
});
|
||||
};
|
||||
ThrottlingRetryPolicy.prototype.retry = function (httpRequest, httpResponse, retryCount) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var retryAfterHeader, delayInMs, res;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
if (httpResponse.status !== StatusCodes.TooManyRequests) {
|
||||
return [2 /*return*/, httpResponse];
|
||||
}
|
||||
retryAfterHeader = httpResponse.headers.get(Constants.HeaderConstants.RETRY_AFTER);
|
||||
if (!(retryAfterHeader && retryCount < this.retryLimit)) return [3 /*break*/, 3];
|
||||
delayInMs = ThrottlingRetryPolicy.parseRetryAfterHeader(retryAfterHeader);
|
||||
if (!delayInMs) return [3 /*break*/, 3];
|
||||
return [4 /*yield*/, delay(delayInMs)];
|
||||
case 1:
|
||||
_a.sent();
|
||||
return [4 /*yield*/, this._nextPolicy.sendRequest(httpRequest)];
|
||||
case 2:
|
||||
res = _a.sent();
|
||||
return [2 /*return*/, this.retry(httpRequest, res, retryCount + 1)];
|
||||
case 3: return [2 /*return*/, httpResponse];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
ThrottlingRetryPolicy.parseRetryAfterHeader = function (headerValue) {
|
||||
var retryAfterInSeconds = Number(headerValue);
|
||||
if (Number.isNaN(retryAfterInSeconds)) {
|
||||
return ThrottlingRetryPolicy.parseDateRetryAfterHeader(headerValue);
|
||||
}
|
||||
else {
|
||||
return retryAfterInSeconds * 1000;
|
||||
}
|
||||
};
|
||||
ThrottlingRetryPolicy.parseDateRetryAfterHeader = function (headerValue) {
|
||||
try {
|
||||
var now = Date.now();
|
||||
var date = Date.parse(headerValue);
|
||||
var diff = date - now;
|
||||
return Number.isNaN(diff) ? undefined : diff;
|
||||
}
|
||||
catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
};
|
||||
return ThrottlingRetryPolicy;
|
||||
}(BaseRequestPolicy));
|
||||
export { ThrottlingRetryPolicy };
|
||||
//# sourceMappingURL=throttlingRetryPolicy.js.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/throttlingRetryPolicy.js.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/throttlingRetryPolicy.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"throttlingRetryPolicy.js","sourceRoot":"","sources":["../../../lib/policies/throttlingRetryPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAE/F,OAAO,EACL,iBAAiB,GAIlB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,IAAM,WAAW,GAAG,SAAS,CAAC,aAAa,CAAC,WAAW,CAAC;AACxD,IAAM,mBAAmB,GAAG,CAAC,CAAC;AAY9B,MAAM,UAAU,qBAAqB,CACnC,UAAwC;IAAxC,2BAAA,EAAA,gCAAwC;IAExC,OAAO;QACL,MAAM,EAAE,UAAC,UAAyB,EAAE,OAAiC;YACnE,OAAO,IAAI,qBAAqB,CAAC,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QACpE,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;;;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B,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;QAChD,IAAI,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,EAAE;YACrC,OAAO,qBAAqB,CAAC,yBAAyB,CAAC,WAAW,CAAC,CAAC;SACrE;aAAM;YACL,OAAO,mBAAmB,GAAG,IAAI,CAAC;SACnC;IACH,CAAC;IAEa,+CAAyB,GAAvC,UAAwC,WAAmB;QACzD,IAAI;YACF,IAAM,GAAG,GAAW,IAAI,CAAC,GAAG,EAAE,CAAC;YAC/B,IAAM,IAAI,GAAW,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;YAC7C,IAAM,IAAI,GAAG,IAAI,GAAG,GAAG,CAAC;YAExB,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;SAC9C;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,SAAS,CAAC;SAClB;IACH,CAAC;IACH,4BAAC;AAAD,CAAC,AA7DD,CAA2C,iBAAiB,GA6D3D"}
|
21
node_modules/@azure/ms-rest-js/es/lib/policies/userAgentPolicy.d.ts
generated
vendored
Normal file
21
node_modules/@azure/ms-rest-js/es/lib/policies/userAgentPolicy.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
import { HttpOperationResponse } from "../httpOperationResponse";
|
||||
import { WebResourceLike } from "../webResource";
|
||||
import { getDefaultUserAgentKey } from "./msRestUserAgentPolicy";
|
||||
import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy";
|
||||
export declare type TelemetryInfo = {
|
||||
key?: string;
|
||||
value?: string;
|
||||
};
|
||||
export declare const getDefaultUserAgentHeaderName: typeof getDefaultUserAgentKey;
|
||||
export declare function getDefaultUserAgentValue(): string;
|
||||
export declare function userAgentPolicy(userAgentData?: TelemetryInfo): RequestPolicyFactory;
|
||||
export declare class UserAgentPolicy extends BaseRequestPolicy {
|
||||
readonly _nextPolicy: RequestPolicy;
|
||||
readonly _options: RequestPolicyOptionsLike;
|
||||
protected headerKey: string;
|
||||
protected headerValue: string;
|
||||
constructor(_nextPolicy: RequestPolicy, _options: RequestPolicyOptionsLike, headerKey: string, headerValue: string);
|
||||
sendRequest(request: WebResourceLike): Promise<HttpOperationResponse>;
|
||||
addUserAgentHeader(request: WebResourceLike): void;
|
||||
}
|
||||
//# sourceMappingURL=userAgentPolicy.d.ts.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/userAgentPolicy.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/userAgentPolicy.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"userAgentPolicy.d.ts","sourceRoot":"","sources":["../../../lib/policies/userAgentPolicy.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAA2B,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,iBAAiB,CAAC;AAEzB,oBAAY,aAAa,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAwB7D,eAAO,MAAM,6BAA6B,+BAAyB,CAAC;AAEpE,wBAAgB,wBAAwB,IAAI,MAAM,CAKjD;AAED,wBAAgB,eAAe,CAAC,aAAa,CAAC,EAAE,aAAa,GAAG,oBAAoB,CAanF;AAED,qBAAa,eAAgB,SAAQ,iBAAiB;IAElD,QAAQ,CAAC,WAAW,EAAE,aAAa;IACnC,QAAQ,CAAC,QAAQ,EAAE,wBAAwB;IAC3C,SAAS,CAAC,SAAS,EAAE,MAAM;IAC3B,SAAS,CAAC,WAAW,EAAE,MAAM;gBAHpB,WAAW,EAAE,aAAa,EAC1B,QAAQ,EAAE,wBAAwB,EACjC,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM;IAK/B,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAKrE,kBAAkB,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;CASnD"}
|
68
node_modules/@azure/ms-rest-js/es/lib/policies/userAgentPolicy.js
generated
vendored
Normal file
68
node_modules/@azure/ms-rest-js/es/lib/policies/userAgentPolicy.js
generated
vendored
Normal file
|
@ -0,0 +1,68 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
import { __extends } from "tslib";
|
||||
import { HttpHeaders } from "../httpHeaders";
|
||||
import { Constants } from "../util/constants";
|
||||
import { getDefaultUserAgentKey, getPlatformSpecificData } from "./msRestUserAgentPolicy";
|
||||
import { BaseRequestPolicy, } from "./requestPolicy";
|
||||
function getRuntimeInfo() {
|
||||
var msRestRuntime = {
|
||||
key: "ms-rest-js",
|
||||
value: Constants.msRestVersion,
|
||||
};
|
||||
return [msRestRuntime];
|
||||
}
|
||||
function getUserAgentString(telemetryInfo, keySeparator, valueSeparator) {
|
||||
if (keySeparator === void 0) { keySeparator = " "; }
|
||||
if (valueSeparator === void 0) { valueSeparator = "/"; }
|
||||
return telemetryInfo
|
||||
.map(function (info) {
|
||||
var value = info.value ? "" + valueSeparator + info.value : "";
|
||||
return "" + info.key + value;
|
||||
})
|
||||
.join(keySeparator);
|
||||
}
|
||||
export var getDefaultUserAgentHeaderName = getDefaultUserAgentKey;
|
||||
export function getDefaultUserAgentValue() {
|
||||
var runtimeInfo = getRuntimeInfo();
|
||||
var platformSpecificData = getPlatformSpecificData();
|
||||
var userAgent = getUserAgentString(runtimeInfo.concat(platformSpecificData));
|
||||
return userAgent;
|
||||
}
|
||||
export function userAgentPolicy(userAgentData) {
|
||||
var key = !userAgentData || userAgentData.key == undefined ? getDefaultUserAgentKey() : userAgentData.key;
|
||||
var value = !userAgentData || userAgentData.value == undefined
|
||||
? getDefaultUserAgentValue()
|
||||
: userAgentData.value;
|
||||
return {
|
||||
create: function (nextPolicy, options) {
|
||||
return new UserAgentPolicy(nextPolicy, options, key, value);
|
||||
},
|
||||
};
|
||||
}
|
||||
var UserAgentPolicy = /** @class */ (function (_super) {
|
||||
__extends(UserAgentPolicy, _super);
|
||||
function UserAgentPolicy(_nextPolicy, _options, headerKey, headerValue) {
|
||||
var _this = _super.call(this, _nextPolicy, _options) || this;
|
||||
_this._nextPolicy = _nextPolicy;
|
||||
_this._options = _options;
|
||||
_this.headerKey = headerKey;
|
||||
_this.headerValue = headerValue;
|
||||
return _this;
|
||||
}
|
||||
UserAgentPolicy.prototype.sendRequest = function (request) {
|
||||
this.addUserAgentHeader(request);
|
||||
return this._nextPolicy.sendRequest(request);
|
||||
};
|
||||
UserAgentPolicy.prototype.addUserAgentHeader = function (request) {
|
||||
if (!request.headers) {
|
||||
request.headers = new HttpHeaders();
|
||||
}
|
||||
if (!request.headers.get(this.headerKey) && this.headerValue) {
|
||||
request.headers.set(this.headerKey, this.headerValue);
|
||||
}
|
||||
};
|
||||
return UserAgentPolicy;
|
||||
}(BaseRequestPolicy));
|
||||
export { UserAgentPolicy };
|
||||
//# sourceMappingURL=userAgentPolicy.js.map
|
1
node_modules/@azure/ms-rest-js/es/lib/policies/userAgentPolicy.js.map
generated
vendored
Normal file
1
node_modules/@azure/ms-rest-js/es/lib/policies/userAgentPolicy.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"userAgentPolicy.js","sourceRoot":"","sources":["../../../lib/policies/userAgentPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAE/F,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAA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