Estructura inicial del proyecto
This commit is contained in:
21
backend/node_modules/@azure/core-http-compat/LICENSE
generated
vendored
Normal file
21
backend/node_modules/@azure/core-http-compat/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
31
backend/node_modules/@azure/core-http-compat/README.md
generated
vendored
Normal file
31
backend/node_modules/@azure/core-http-compat/README.md
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
# Azure Core HTTP Compatibility library for JavaScript
|
||||
|
||||
This library provides classes and interfaces to be used by Azure client libraries that want to move from using [@azure/core-http](https://www.npmjs.com/package/@azure/core-http) to [@azure/core-client](https://www.npmjs.com/package/@azure/core-client) & [@azure/core-rest-pipeline](https://www.npmjs.com/package/@azure/core-rest-pipeline) without causing breaking changes in their public API surface.
|
||||
|
||||
## Usage
|
||||
|
||||
### ExtendedCommonClientOptions
|
||||
|
||||
With `@azure/core-http` library, the `options` parameter to the custom client will look like:
|
||||
|
||||
```
|
||||
export interface SearchClientOptions extends PipelineOptions {
|
||||
apiVersion?: string;
|
||||
}
|
||||
```
|
||||
|
||||
With the `@azure/core-client` & `@azure/core-rest-pipeline` libraries, the `options` parameter to the custom client will look like:
|
||||
|
||||
```
|
||||
export interface SearchClientOptions extends CommonClientOptions {
|
||||
apiVersion?: string;
|
||||
}
|
||||
```
|
||||
|
||||
With the Core HTTP Compatibility library, the `options` parameter to the custom client will look like:
|
||||
|
||||
```
|
||||
export interface SearchClientOptions extends ExtendedCommonClientOptions {
|
||||
apiVersion?: string;
|
||||
}
|
||||
```
|
||||
40
backend/node_modules/@azure/core-http-compat/dist/browser/extendedClient.d.ts
generated
vendored
Normal file
40
backend/node_modules/@azure/core-http-compat/dist/browser/extendedClient.d.ts
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
import type { KeepAliveOptions } from "./policies/keepAliveOptions.js";
|
||||
import type { RedirectOptions } from "./policies/redirectOptions.js";
|
||||
import type { CommonClientOptions, OperationArguments, OperationSpec, ServiceClientOptions } from "@azure/core-client";
|
||||
import { ServiceClient } from "@azure/core-client";
|
||||
/**
|
||||
* Options specific to Shim Clients.
|
||||
*/
|
||||
export interface ExtendedClientOptions {
|
||||
/**
|
||||
* Options to disable keep alive.
|
||||
*/
|
||||
keepAliveOptions?: KeepAliveOptions;
|
||||
/**
|
||||
* Options to redirect requests.
|
||||
*/
|
||||
redirectOptions?: RedirectOptions;
|
||||
}
|
||||
/**
|
||||
* Options that shim clients are expected to expose.
|
||||
*/
|
||||
export type ExtendedServiceClientOptions = ServiceClientOptions & ExtendedClientOptions;
|
||||
/**
|
||||
* The common set of options that custom shim clients are expected to expose.
|
||||
*/
|
||||
export type ExtendedCommonClientOptions = CommonClientOptions & ExtendedClientOptions;
|
||||
/**
|
||||
* Client to provide compatability between core V1 & V2.
|
||||
*/
|
||||
export declare class ExtendedServiceClient extends ServiceClient {
|
||||
constructor(options: ExtendedServiceClientOptions);
|
||||
/**
|
||||
* Compatible send operation request function.
|
||||
*
|
||||
* @param operationArguments - Operation arguments
|
||||
* @param operationSpec - Operation Spec
|
||||
* @returns
|
||||
*/
|
||||
sendOperationRequest<T>(operationArguments: OperationArguments, operationSpec: OperationSpec): Promise<T>;
|
||||
}
|
||||
//# sourceMappingURL=extendedClient.d.ts.map
|
||||
52
backend/node_modules/@azure/core-http-compat/dist/browser/extendedClient.js
generated
vendored
Normal file
52
backend/node_modules/@azure/core-http-compat/dist/browser/extendedClient.js
generated
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { createDisableKeepAlivePolicy, pipelineContainsDisableKeepAlivePolicy, } from "./policies/disableKeepAlivePolicy.js";
|
||||
import { redirectPolicyName } from "@azure/core-rest-pipeline";
|
||||
import { ServiceClient } from "@azure/core-client";
|
||||
import { toCompatResponse } from "./response.js";
|
||||
/**
|
||||
* Client to provide compatability between core V1 & V2.
|
||||
*/
|
||||
export class ExtendedServiceClient extends ServiceClient {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
if (options.keepAliveOptions?.enable === false &&
|
||||
!pipelineContainsDisableKeepAlivePolicy(this.pipeline)) {
|
||||
this.pipeline.addPolicy(createDisableKeepAlivePolicy());
|
||||
}
|
||||
if (options.redirectOptions?.handleRedirects === false) {
|
||||
this.pipeline.removePolicy({
|
||||
name: redirectPolicyName,
|
||||
});
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Compatible send operation request function.
|
||||
*
|
||||
* @param operationArguments - Operation arguments
|
||||
* @param operationSpec - Operation Spec
|
||||
* @returns
|
||||
*/
|
||||
async sendOperationRequest(operationArguments, operationSpec) {
|
||||
const userProvidedCallBack = operationArguments?.options?.onResponse;
|
||||
let lastResponse;
|
||||
function onResponse(rawResponse, flatResponse, error) {
|
||||
lastResponse = rawResponse;
|
||||
if (userProvidedCallBack) {
|
||||
userProvidedCallBack(rawResponse, flatResponse, error);
|
||||
}
|
||||
}
|
||||
operationArguments.options = {
|
||||
...operationArguments.options,
|
||||
onResponse,
|
||||
};
|
||||
const result = await super.sendOperationRequest(operationArguments, operationSpec);
|
||||
if (lastResponse) {
|
||||
Object.defineProperty(result, "_response", {
|
||||
value: toCompatResponse(lastResponse),
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=extendedClient.js.map
|
||||
1
backend/node_modules/@azure/core-http-compat/dist/browser/extendedClient.js.map
generated
vendored
Normal file
1
backend/node_modules/@azure/core-http-compat/dist/browser/extendedClient.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"extendedClient.js","sourceRoot":"","sources":["../../src/extendedClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EACL,4BAA4B,EAC5B,sCAAsC,GACvC,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAS/D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AA0BjD;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,aAAa;IACtD,YAAY,OAAqC;QAC/C,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IACE,OAAO,CAAC,gBAAgB,EAAE,MAAM,KAAK,KAAK;YAC1C,CAAC,sCAAsC,CAAC,IAAI,CAAC,QAAQ,CAAC,EACtD,CAAC;YACD,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,4BAA4B,EAAE,CAAC,CAAC;QAC1D,CAAC;QAED,IAAI,OAAO,CAAC,eAAe,EAAE,eAAe,KAAK,KAAK,EAAE,CAAC;YACvD,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC;gBACzB,IAAI,EAAE,kBAAkB;aACzB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,oBAAoB,CACxB,kBAAsC,EACtC,aAA4B;QAE5B,MAAM,oBAAoB,GACxB,kBAAkB,EAAE,OAAO,EAAE,UAAU,CAAC;QAE1C,IAAI,YAA+C,CAAC;QAEpD,SAAS,UAAU,CACjB,WAAkC,EAClC,YAAqB,EACrB,KAAe;YAEf,YAAY,GAAG,WAAW,CAAC;YAC3B,IAAI,oBAAoB,EAAE,CAAC;gBACzB,oBAAoB,CAAC,WAAW,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;YACzD,CAAC;QACH,CAAC;QAED,kBAAkB,CAAC,OAAO,GAAG;YAC3B,GAAG,kBAAkB,CAAC,OAAO;YAC7B,UAAU;SACX,CAAC;QAEF,MAAM,MAAM,GAAM,MAAM,KAAK,CAAC,oBAAoB,CAAC,kBAAkB,EAAE,aAAa,CAAC,CAAC;QAEtF,IAAI,YAAY,EAAE,CAAC;YACjB,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE;gBACzC,KAAK,EAAE,gBAAgB,CAAC,YAAY,CAAC;aACtC,CAAC,CAAC;QACL,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { KeepAliveOptions } from \"./policies/keepAliveOptions.js\";\nimport {\n createDisableKeepAlivePolicy,\n pipelineContainsDisableKeepAlivePolicy,\n} from \"./policies/disableKeepAlivePolicy.js\";\nimport type { RedirectOptions } from \"./policies/redirectOptions.js\";\nimport { redirectPolicyName } from \"@azure/core-rest-pipeline\";\nimport type {\n CommonClientOptions,\n FullOperationResponse,\n OperationArguments,\n OperationSpec,\n RawResponseCallback,\n ServiceClientOptions,\n} from \"@azure/core-client\";\nimport { ServiceClient } from \"@azure/core-client\";\nimport { toCompatResponse } from \"./response.js\";\n\n/**\n * Options specific to Shim Clients.\n */\nexport interface ExtendedClientOptions {\n /**\n * Options to disable keep alive.\n */\n keepAliveOptions?: KeepAliveOptions;\n /**\n * Options to redirect requests.\n */\n redirectOptions?: RedirectOptions;\n}\n\n/**\n * Options that shim clients are expected to expose.\n */\nexport type ExtendedServiceClientOptions = ServiceClientOptions & ExtendedClientOptions;\n\n/**\n * The common set of options that custom shim clients are expected to expose.\n */\nexport type ExtendedCommonClientOptions = CommonClientOptions & ExtendedClientOptions;\n\n/**\n * Client to provide compatability between core V1 & V2.\n */\nexport class ExtendedServiceClient extends ServiceClient {\n constructor(options: ExtendedServiceClientOptions) {\n super(options);\n\n if (\n options.keepAliveOptions?.enable === false &&\n !pipelineContainsDisableKeepAlivePolicy(this.pipeline)\n ) {\n this.pipeline.addPolicy(createDisableKeepAlivePolicy());\n }\n\n if (options.redirectOptions?.handleRedirects === false) {\n this.pipeline.removePolicy({\n name: redirectPolicyName,\n });\n }\n }\n\n /**\n * Compatible send operation request function.\n *\n * @param operationArguments - Operation arguments\n * @param operationSpec - Operation Spec\n * @returns\n */\n async sendOperationRequest<T>(\n operationArguments: OperationArguments,\n operationSpec: OperationSpec,\n ): Promise<T> {\n const userProvidedCallBack: RawResponseCallback | undefined =\n operationArguments?.options?.onResponse;\n\n let lastResponse: FullOperationResponse | undefined;\n\n function onResponse(\n rawResponse: FullOperationResponse,\n flatResponse: unknown,\n error?: unknown,\n ): void {\n lastResponse = rawResponse;\n if (userProvidedCallBack) {\n userProvidedCallBack(rawResponse, flatResponse, error);\n }\n }\n\n operationArguments.options = {\n ...operationArguments.options,\n onResponse,\n };\n\n const result: T = await super.sendOperationRequest(operationArguments, operationSpec);\n\n if (lastResponse) {\n Object.defineProperty(result, \"_response\", {\n value: toCompatResponse(lastResponse),\n });\n }\n\n return result;\n }\n}\n"]}
|
||||
9
backend/node_modules/@azure/core-http-compat/dist/browser/httpClientAdapter.d.ts
generated
vendored
Normal file
9
backend/node_modules/@azure/core-http-compat/dist/browser/httpClientAdapter.d.ts
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
import type { HttpClient } from "@azure/core-rest-pipeline";
|
||||
import type { RequestPolicy } from "./policies/requestPolicyFactoryPolicy.js";
|
||||
/**
|
||||
* Converts a RequestPolicy based HttpClient to a PipelineRequest based HttpClient.
|
||||
* @param requestPolicyClient - A HttpClient compatible with core-http
|
||||
* @returns A HttpClient compatible with core-rest-pipeline
|
||||
*/
|
||||
export declare function convertHttpClient(requestPolicyClient: RequestPolicy): HttpClient;
|
||||
//# sourceMappingURL=httpClientAdapter.d.ts.map
|
||||
18
backend/node_modules/@azure/core-http-compat/dist/browser/httpClientAdapter.js
generated
vendored
Normal file
18
backend/node_modules/@azure/core-http-compat/dist/browser/httpClientAdapter.js
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { toPipelineResponse } from "./response.js";
|
||||
import { toWebResourceLike } from "./util.js";
|
||||
/**
|
||||
* Converts a RequestPolicy based HttpClient to a PipelineRequest based HttpClient.
|
||||
* @param requestPolicyClient - A HttpClient compatible with core-http
|
||||
* @returns A HttpClient compatible with core-rest-pipeline
|
||||
*/
|
||||
export function convertHttpClient(requestPolicyClient) {
|
||||
return {
|
||||
sendRequest: async (request) => {
|
||||
const response = await requestPolicyClient.sendRequest(toWebResourceLike(request, { createProxy: true }));
|
||||
return toPipelineResponse(response);
|
||||
},
|
||||
};
|
||||
}
|
||||
//# sourceMappingURL=httpClientAdapter.js.map
|
||||
1
backend/node_modules/@azure/core-http-compat/dist/browser/httpClientAdapter.js.map
generated
vendored
Normal file
1
backend/node_modules/@azure/core-http-compat/dist/browser/httpClientAdapter.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"httpClientAdapter.js","sourceRoot":"","sources":["../../src/httpClientAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,mBAAkC;IAClE,OAAO;QACL,WAAW,EAAE,KAAK,EAAE,OAAwB,EAA6B,EAAE;YACzE,MAAM,QAAQ,GAAG,MAAM,mBAAmB,CAAC,WAAW,CACpD,iBAAiB,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAClD,CAAC;YACF,OAAO,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QACtC,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { HttpClient, PipelineRequest, PipelineResponse } from \"@azure/core-rest-pipeline\";\nimport type { RequestPolicy } from \"./policies/requestPolicyFactoryPolicy.js\";\nimport { toPipelineResponse } from \"./response.js\";\nimport { toWebResourceLike } from \"./util.js\";\n\n/**\n * Converts a RequestPolicy based HttpClient to a PipelineRequest based HttpClient.\n * @param requestPolicyClient - A HttpClient compatible with core-http\n * @returns A HttpClient compatible with core-rest-pipeline\n */\nexport function convertHttpClient(requestPolicyClient: RequestPolicy): HttpClient {\n return {\n sendRequest: async (request: PipelineRequest): Promise<PipelineResponse> => {\n const response = await requestPolicyClient.sendRequest(\n toWebResourceLike(request, { createProxy: true }),\n );\n return toPipelineResponse(response);\n },\n };\n}\n"]}
|
||||
15
backend/node_modules/@azure/core-http-compat/dist/browser/index.d.ts
generated
vendored
Normal file
15
backend/node_modules/@azure/core-http-compat/dist/browser/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* A Shim Library that provides compatibility between Core V1 & V2 Packages.
|
||||
*
|
||||
* @packageDocumentation
|
||||
*/
|
||||
export { ExtendedServiceClient, type ExtendedServiceClientOptions, type ExtendedCommonClientOptions, type ExtendedClientOptions, } from "./extendedClient.js";
|
||||
export { toCompatResponse } from "./response.js";
|
||||
export type { CompatResponse } from "./response.js";
|
||||
export { requestPolicyFactoryPolicyName, createRequestPolicyFactoryPolicy, type RequestPolicyFactory, type RequestPolicy, type RequestPolicyOptionsLike, HttpPipelineLogLevel, } from "./policies/requestPolicyFactoryPolicy.js";
|
||||
export type { KeepAliveOptions } from "./policies/keepAliveOptions.js";
|
||||
export type { RedirectOptions } from "./policies/redirectOptions.js";
|
||||
export { disableKeepAlivePolicyName } from "./policies/disableKeepAlivePolicy.js";
|
||||
export { convertHttpClient } from "./httpClientAdapter.js";
|
||||
export { type Agent, type WebResourceLike, type HttpHeadersLike, type RawHttpHeaders, type HttpHeader, type TransferProgressEvent, toHttpHeadersLike, } from "./util.js";
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
14
backend/node_modules/@azure/core-http-compat/dist/browser/index.js
generated
vendored
Normal file
14
backend/node_modules/@azure/core-http-compat/dist/browser/index.js
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
/**
|
||||
* A Shim Library that provides compatibility between Core V1 & V2 Packages.
|
||||
*
|
||||
* @packageDocumentation
|
||||
*/
|
||||
export { ExtendedServiceClient, } from "./extendedClient.js";
|
||||
export { toCompatResponse } from "./response.js";
|
||||
export { requestPolicyFactoryPolicyName, createRequestPolicyFactoryPolicy, HttpPipelineLogLevel, } from "./policies/requestPolicyFactoryPolicy.js";
|
||||
export { disableKeepAlivePolicyName } from "./policies/disableKeepAlivePolicy.js";
|
||||
export { convertHttpClient } from "./httpClientAdapter.js";
|
||||
export { toHttpHeadersLike, } from "./util.js";
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
backend/node_modules/@azure/core-http-compat/dist/browser/index.js.map
generated
vendored
Normal file
1
backend/node_modules/@azure/core-http-compat/dist/browser/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;GAIG;AACH,OAAO,EACL,qBAAqB,GAItB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EACL,8BAA8B,EAC9B,gCAAgC,EAIhC,oBAAoB,GACrB,MAAM,0CAA0C,CAAC;AAGlD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAOL,iBAAiB,GAClB,MAAM,WAAW,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * A Shim Library that provides compatibility between Core V1 & V2 Packages.\n *\n * @packageDocumentation\n */\nexport {\n ExtendedServiceClient,\n type ExtendedServiceClientOptions,\n type ExtendedCommonClientOptions,\n type ExtendedClientOptions,\n} from \"./extendedClient.js\";\nexport { toCompatResponse } from \"./response.js\";\nexport type { CompatResponse } from \"./response.js\";\nexport {\n requestPolicyFactoryPolicyName,\n createRequestPolicyFactoryPolicy,\n type RequestPolicyFactory,\n type RequestPolicy,\n type RequestPolicyOptionsLike,\n HttpPipelineLogLevel,\n} from \"./policies/requestPolicyFactoryPolicy.js\";\nexport type { KeepAliveOptions } from \"./policies/keepAliveOptions.js\";\nexport type { RedirectOptions } from \"./policies/redirectOptions.js\";\nexport { disableKeepAlivePolicyName } from \"./policies/disableKeepAlivePolicy.js\";\nexport { convertHttpClient } from \"./httpClientAdapter.js\";\nexport {\n type Agent,\n type WebResourceLike,\n type HttpHeadersLike,\n type RawHttpHeaders,\n type HttpHeader,\n type TransferProgressEvent,\n toHttpHeadersLike,\n} from \"./util.js\";\n"]}
|
||||
3
backend/node_modules/@azure/core-http-compat/dist/browser/package.json
generated
vendored
Normal file
3
backend/node_modules/@azure/core-http-compat/dist/browser/package.json
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
8
backend/node_modules/@azure/core-http-compat/dist/browser/policies/disableKeepAlivePolicy.d.ts
generated
vendored
Normal file
8
backend/node_modules/@azure/core-http-compat/dist/browser/policies/disableKeepAlivePolicy.d.ts
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import type { Pipeline, PipelinePolicy } from "@azure/core-rest-pipeline";
|
||||
export declare const disableKeepAlivePolicyName = "DisableKeepAlivePolicy";
|
||||
export declare function createDisableKeepAlivePolicy(): PipelinePolicy;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare function pipelineContainsDisableKeepAlivePolicy(pipeline: Pipeline): boolean;
|
||||
//# sourceMappingURL=disableKeepAlivePolicy.d.ts.map
|
||||
19
backend/node_modules/@azure/core-http-compat/dist/browser/policies/disableKeepAlivePolicy.js
generated
vendored
Normal file
19
backend/node_modules/@azure/core-http-compat/dist/browser/policies/disableKeepAlivePolicy.js
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
export const disableKeepAlivePolicyName = "DisableKeepAlivePolicy";
|
||||
export function createDisableKeepAlivePolicy() {
|
||||
return {
|
||||
name: disableKeepAlivePolicyName,
|
||||
async sendRequest(request, next) {
|
||||
request.disableKeepAlive = true;
|
||||
return next(request);
|
||||
},
|
||||
};
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export function pipelineContainsDisableKeepAlivePolicy(pipeline) {
|
||||
return pipeline.getOrderedPolicies().some((policy) => policy.name === disableKeepAlivePolicyName);
|
||||
}
|
||||
//# sourceMappingURL=disableKeepAlivePolicy.js.map
|
||||
1
backend/node_modules/@azure/core-http-compat/dist/browser/policies/disableKeepAlivePolicy.js.map
generated
vendored
Normal file
1
backend/node_modules/@azure/core-http-compat/dist/browser/policies/disableKeepAlivePolicy.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"disableKeepAlivePolicy.js","sourceRoot":"","sources":["../../../src/policies/disableKeepAlivePolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAUlC,MAAM,CAAC,MAAM,0BAA0B,GAAG,wBAAwB,CAAC;AAEnE,MAAM,UAAU,4BAA4B;IAC1C,OAAO;QACL,IAAI,EAAE,0BAA0B;QAChC,KAAK,CAAC,WAAW,CAAC,OAAwB,EAAE,IAAiB;YAC3D,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;YAChC,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sCAAsC,CAAC,QAAkB;IACvE,OAAO,QAAQ,CAAC,kBAAkB,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,0BAA0B,CAAC,CAAC;AACpG,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n Pipeline,\n PipelinePolicy,\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\n\nexport const disableKeepAlivePolicyName = \"DisableKeepAlivePolicy\";\n\nexport function createDisableKeepAlivePolicy(): PipelinePolicy {\n return {\n name: disableKeepAlivePolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise<PipelineResponse> {\n request.disableKeepAlive = true;\n return next(request);\n },\n };\n}\n\n/**\n * @internal\n */\nexport function pipelineContainsDisableKeepAlivePolicy(pipeline: Pipeline): boolean {\n return pipeline.getOrderedPolicies().some((policy) => policy.name === disableKeepAlivePolicyName);\n}\n"]}
|
||||
11
backend/node_modules/@azure/core-http-compat/dist/browser/policies/keepAliveOptions.d.ts
generated
vendored
Normal file
11
backend/node_modules/@azure/core-http-compat/dist/browser/policies/keepAliveOptions.d.ts
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Keep Alive Options for how HTTP connections.
|
||||
*/
|
||||
export interface KeepAliveOptions {
|
||||
/**
|
||||
* When true, connections will be kept alive for multiple requests.
|
||||
* Defaults to true.
|
||||
*/
|
||||
enable?: boolean;
|
||||
}
|
||||
//# sourceMappingURL=keepAliveOptions.d.ts.map
|
||||
4
backend/node_modules/@azure/core-http-compat/dist/browser/policies/keepAliveOptions.js
generated
vendored
Normal file
4
backend/node_modules/@azure/core-http-compat/dist/browser/policies/keepAliveOptions.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
export {};
|
||||
//# sourceMappingURL=keepAliveOptions.js.map
|
||||
1
backend/node_modules/@azure/core-http-compat/dist/browser/policies/keepAliveOptions.js.map
generated
vendored
Normal file
1
backend/node_modules/@azure/core-http-compat/dist/browser/policies/keepAliveOptions.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"keepAliveOptions.js","sourceRoot":"","sources":["../../../src/policies/keepAliveOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Keep Alive Options for how HTTP connections.\n */\nexport interface KeepAliveOptions {\n /**\n * When true, connections will be kept alive for multiple requests.\n * Defaults to true.\n */\n enable?: boolean;\n}\n"]}
|
||||
15
backend/node_modules/@azure/core-http-compat/dist/browser/policies/redirectOptions.d.ts
generated
vendored
Normal file
15
backend/node_modules/@azure/core-http-compat/dist/browser/policies/redirectOptions.d.ts
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Options for how redirect responses are handled.
|
||||
*/
|
||||
export interface RedirectOptions {
|
||||
/**
|
||||
* When true, redirect responses are followed. Defaults to true.
|
||||
*/
|
||||
handleRedirects?: boolean;
|
||||
/**
|
||||
* The maximum number of times the redirect URL will be tried before
|
||||
* failing. Defaults to 20.
|
||||
*/
|
||||
maxRetries?: number;
|
||||
}
|
||||
//# sourceMappingURL=redirectOptions.d.ts.map
|
||||
4
backend/node_modules/@azure/core-http-compat/dist/browser/policies/redirectOptions.js
generated
vendored
Normal file
4
backend/node_modules/@azure/core-http-compat/dist/browser/policies/redirectOptions.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
export {};
|
||||
//# sourceMappingURL=redirectOptions.js.map
|
||||
1
backend/node_modules/@azure/core-http-compat/dist/browser/policies/redirectOptions.js.map
generated
vendored
Normal file
1
backend/node_modules/@azure/core-http-compat/dist/browser/policies/redirectOptions.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"redirectOptions.js","sourceRoot":"","sources":["../../../src/policies/redirectOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Options for how redirect responses are handled.\n */\nexport interface RedirectOptions {\n /**\n * When true, redirect responses are followed. Defaults to true.\n */\n handleRedirects?: boolean;\n\n /**\n * The maximum number of times the redirect URL will be tried before\n * failing. Defaults to 20.\n */\n maxRetries?: number;\n}\n"]}
|
||||
41
backend/node_modules/@azure/core-http-compat/dist/browser/policies/requestPolicyFactoryPolicy.d.ts
generated
vendored
Normal file
41
backend/node_modules/@azure/core-http-compat/dist/browser/policies/requestPolicyFactoryPolicy.d.ts
generated
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
import type { PipelinePolicy } from "@azure/core-rest-pipeline";
|
||||
import type { WebResourceLike } from "../util.js";
|
||||
import type { CompatResponse } from "../response.js";
|
||||
/**
|
||||
* A compatible interface for core-http request policies
|
||||
*/
|
||||
export interface RequestPolicy {
|
||||
sendRequest(httpRequest: WebResourceLike): Promise<CompatResponse>;
|
||||
}
|
||||
/**
|
||||
* An enum for compatibility with RequestPolicy
|
||||
*/
|
||||
export declare enum HttpPipelineLogLevel {
|
||||
ERROR = 1,
|
||||
INFO = 3,
|
||||
OFF = 0,
|
||||
WARNING = 2
|
||||
}
|
||||
/**
|
||||
* An interface for compatibility with RequestPolicy
|
||||
*/
|
||||
export interface RequestPolicyOptionsLike {
|
||||
log(logLevel: HttpPipelineLogLevel, message: string): void;
|
||||
shouldLog(logLevel: HttpPipelineLogLevel): boolean;
|
||||
}
|
||||
/**
|
||||
* An interface for compatibility with core-http's RequestPolicyFactory
|
||||
*/
|
||||
export interface RequestPolicyFactory {
|
||||
create(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike): RequestPolicy;
|
||||
}
|
||||
/**
|
||||
* The name of the RequestPolicyFactoryPolicy
|
||||
*/
|
||||
export declare const requestPolicyFactoryPolicyName = "RequestPolicyFactoryPolicy";
|
||||
/**
|
||||
* A policy that wraps policies written for core-http.
|
||||
* @param factories - An array of `RequestPolicyFactory` objects from a core-http pipeline
|
||||
*/
|
||||
export declare function createRequestPolicyFactoryPolicy(factories: RequestPolicyFactory[]): PipelinePolicy;
|
||||
//# sourceMappingURL=requestPolicyFactoryPolicy.d.ts.map
|
||||
51
backend/node_modules/@azure/core-http-compat/dist/browser/policies/requestPolicyFactoryPolicy.js
generated
vendored
Normal file
51
backend/node_modules/@azure/core-http-compat/dist/browser/policies/requestPolicyFactoryPolicy.js
generated
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { toPipelineRequest, toWebResourceLike } from "../util.js";
|
||||
import { toCompatResponse, toPipelineResponse } from "../response.js";
|
||||
/**
|
||||
* An enum for compatibility with RequestPolicy
|
||||
*/
|
||||
export var HttpPipelineLogLevel;
|
||||
(function (HttpPipelineLogLevel) {
|
||||
HttpPipelineLogLevel[HttpPipelineLogLevel["ERROR"] = 1] = "ERROR";
|
||||
HttpPipelineLogLevel[HttpPipelineLogLevel["INFO"] = 3] = "INFO";
|
||||
HttpPipelineLogLevel[HttpPipelineLogLevel["OFF"] = 0] = "OFF";
|
||||
HttpPipelineLogLevel[HttpPipelineLogLevel["WARNING"] = 2] = "WARNING";
|
||||
})(HttpPipelineLogLevel || (HttpPipelineLogLevel = {}));
|
||||
const mockRequestPolicyOptions = {
|
||||
log(_logLevel, _message) {
|
||||
/* do nothing */
|
||||
},
|
||||
shouldLog(_logLevel) {
|
||||
return false;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* The name of the RequestPolicyFactoryPolicy
|
||||
*/
|
||||
export const requestPolicyFactoryPolicyName = "RequestPolicyFactoryPolicy";
|
||||
/**
|
||||
* A policy that wraps policies written for core-http.
|
||||
* @param factories - An array of `RequestPolicyFactory` objects from a core-http pipeline
|
||||
*/
|
||||
export function createRequestPolicyFactoryPolicy(factories) {
|
||||
const orderedFactories = factories.slice().reverse();
|
||||
return {
|
||||
name: requestPolicyFactoryPolicyName,
|
||||
async sendRequest(request, next) {
|
||||
let httpPipeline = {
|
||||
async sendRequest(httpRequest) {
|
||||
const response = await next(toPipelineRequest(httpRequest));
|
||||
return toCompatResponse(response, { createProxy: true });
|
||||
},
|
||||
};
|
||||
for (const factory of orderedFactories) {
|
||||
httpPipeline = factory.create(httpPipeline, mockRequestPolicyOptions);
|
||||
}
|
||||
const webResourceLike = toWebResourceLike(request, { createProxy: true });
|
||||
const response = await httpPipeline.sendRequest(webResourceLike);
|
||||
return toPipelineResponse(response);
|
||||
},
|
||||
};
|
||||
}
|
||||
//# sourceMappingURL=requestPolicyFactoryPolicy.js.map
|
||||
1
backend/node_modules/@azure/core-http-compat/dist/browser/policies/requestPolicyFactoryPolicy.js.map
generated
vendored
Normal file
1
backend/node_modules/@azure/core-http-compat/dist/browser/policies/requestPolicyFactoryPolicy.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"requestPolicyFactoryPolicy.js","sourceRoot":"","sources":["../../../src/policies/requestPolicyFactoryPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AASlC,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAElE,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAStE;;GAEG;AACH,MAAM,CAAN,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,iEAAS,CAAA;IACT,+DAAQ,CAAA;IACR,6DAAO,CAAA;IACP,qEAAW,CAAA;AACb,CAAC,EALW,oBAAoB,KAApB,oBAAoB,QAK/B;AAUD,MAAM,wBAAwB,GAA6B;IACzD,GAAG,CAAC,SAA+B,EAAE,QAAgB;QACnD,gBAAgB;IAClB,CAAC;IACD,SAAS,CAAC,SAA+B;QACvC,OAAO,KAAK,CAAC;IACf,CAAC;CACF,CAAC;AASF;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,4BAA4B,CAAC;AAE3E;;;GAGG;AACH,MAAM,UAAU,gCAAgC,CAC9C,SAAiC;IAEjC,MAAM,gBAAgB,GAAG,SAAS,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,CAAC;IAErD,OAAO;QACL,IAAI,EAAE,8BAA8B;QACpC,KAAK,CAAC,WAAW,CAAC,OAAwB,EAAE,IAAiB;YAC3D,IAAI,YAAY,GAAkB;gBAChC,KAAK,CAAC,WAAW,CAAC,WAAW;oBAC3B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC,CAAC;oBAC5D,OAAO,gBAAgB,CAAC,QAAQ,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;gBAC3D,CAAC;aACF,CAAC;YACF,KAAK,MAAM,OAAO,IAAI,gBAAgB,EAAE,CAAC;gBACvC,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,wBAAwB,CAAC,CAAC;YACxE,CAAC;YAED,MAAM,eAAe,GAAG,iBAAiB,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;YAC1E,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;YACjE,OAAO,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QACtC,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n PipelinePolicy,\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport type { WebResourceLike } from \"../util.js\";\nimport { toPipelineRequest, toWebResourceLike } from \"../util.js\";\nimport type { CompatResponse } from \"../response.js\";\nimport { toCompatResponse, toPipelineResponse } from \"../response.js\";\n\n/**\n * A compatible interface for core-http request policies\n */\nexport interface RequestPolicy {\n sendRequest(httpRequest: WebResourceLike): Promise<CompatResponse>;\n}\n\n/**\n * An enum for compatibility with RequestPolicy\n */\nexport enum HttpPipelineLogLevel {\n ERROR = 1,\n INFO = 3,\n OFF = 0,\n WARNING = 2,\n}\n\n/**\n * An interface for compatibility with RequestPolicy\n */\nexport interface RequestPolicyOptionsLike {\n log(logLevel: HttpPipelineLogLevel, message: string): void;\n shouldLog(logLevel: HttpPipelineLogLevel): boolean;\n}\n\nconst mockRequestPolicyOptions: RequestPolicyOptionsLike = {\n log(_logLevel: HttpPipelineLogLevel, _message: string): void {\n /* do nothing */\n },\n shouldLog(_logLevel: HttpPipelineLogLevel): boolean {\n return false;\n },\n};\n\n/**\n * An interface for compatibility with core-http's RequestPolicyFactory\n */\nexport interface RequestPolicyFactory {\n create(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike): RequestPolicy;\n}\n\n/**\n * The name of the RequestPolicyFactoryPolicy\n */\nexport const requestPolicyFactoryPolicyName = \"RequestPolicyFactoryPolicy\";\n\n/**\n * A policy that wraps policies written for core-http.\n * @param factories - An array of `RequestPolicyFactory` objects from a core-http pipeline\n */\nexport function createRequestPolicyFactoryPolicy(\n factories: RequestPolicyFactory[],\n): PipelinePolicy {\n const orderedFactories = factories.slice().reverse();\n\n return {\n name: requestPolicyFactoryPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise<PipelineResponse> {\n let httpPipeline: RequestPolicy = {\n async sendRequest(httpRequest) {\n const response = await next(toPipelineRequest(httpRequest));\n return toCompatResponse(response, { createProxy: true });\n },\n };\n for (const factory of orderedFactories) {\n httpPipeline = factory.create(httpPipeline, mockRequestPolicyOptions);\n }\n\n const webResourceLike = toWebResourceLike(request, { createProxy: true });\n const response = await httpPipeline.sendRequest(webResourceLike);\n return toPipelineResponse(response);\n },\n };\n}\n"]}
|
||||
30
backend/node_modules/@azure/core-http-compat/dist/browser/response.d.ts
generated
vendored
Normal file
30
backend/node_modules/@azure/core-http-compat/dist/browser/response.d.ts
generated
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
import type { FullOperationResponse } from "@azure/core-client";
|
||||
import type { PipelineResponse } from "@azure/core-rest-pipeline";
|
||||
import type { HttpHeadersLike, WebResourceLike } from "./util.js";
|
||||
/**
|
||||
* Http Response that is compatible with the core-v1(core-http).
|
||||
*/
|
||||
export interface CompatResponse extends Omit<FullOperationResponse, "request" | "headers"> {
|
||||
/**
|
||||
* A description of a HTTP request to be made to a remote server.
|
||||
*/
|
||||
request: WebResourceLike;
|
||||
/**
|
||||
* A collection of HTTP header key/value pairs.
|
||||
*/
|
||||
headers: HttpHeadersLike;
|
||||
}
|
||||
/**
|
||||
* A helper to convert response objects from the new pipeline back to the old one.
|
||||
* @param response - A response object from core-client.
|
||||
* @returns A response compatible with `HttpOperationResponse` from core-http.
|
||||
*/
|
||||
export declare function toCompatResponse(response: FullOperationResponse, options?: {
|
||||
createProxy?: boolean;
|
||||
}): CompatResponse;
|
||||
/**
|
||||
* A helper to convert back to a PipelineResponse
|
||||
* @param compatResponse - A response compatible with `HttpOperationResponse` from core-http.
|
||||
*/
|
||||
export declare function toPipelineResponse(compatResponse: CompatResponse): PipelineResponse;
|
||||
//# sourceMappingURL=response.d.ts.map
|
||||
67
backend/node_modules/@azure/core-http-compat/dist/browser/response.js
generated
vendored
Normal file
67
backend/node_modules/@azure/core-http-compat/dist/browser/response.js
generated
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { createHttpHeaders } from "@azure/core-rest-pipeline";
|
||||
import { toHttpHeadersLike, toPipelineRequest, toWebResourceLike } from "./util.js";
|
||||
const originalResponse = Symbol("Original FullOperationResponse");
|
||||
/**
|
||||
* A helper to convert response objects from the new pipeline back to the old one.
|
||||
* @param response - A response object from core-client.
|
||||
* @returns A response compatible with `HttpOperationResponse` from core-http.
|
||||
*/
|
||||
export function toCompatResponse(response, options) {
|
||||
let request = toWebResourceLike(response.request);
|
||||
let headers = toHttpHeadersLike(response.headers);
|
||||
if (options?.createProxy) {
|
||||
return new Proxy(response, {
|
||||
get(target, prop, receiver) {
|
||||
if (prop === "headers") {
|
||||
return headers;
|
||||
}
|
||||
else if (prop === "request") {
|
||||
return request;
|
||||
}
|
||||
else if (prop === originalResponse) {
|
||||
return response;
|
||||
}
|
||||
return Reflect.get(target, prop, receiver);
|
||||
},
|
||||
set(target, prop, value, receiver) {
|
||||
if (prop === "headers") {
|
||||
headers = value;
|
||||
}
|
||||
else if (prop === "request") {
|
||||
request = value;
|
||||
}
|
||||
return Reflect.set(target, prop, value, receiver);
|
||||
},
|
||||
});
|
||||
}
|
||||
else {
|
||||
return {
|
||||
...response,
|
||||
request,
|
||||
headers,
|
||||
};
|
||||
}
|
||||
}
|
||||
/**
|
||||
* A helper to convert back to a PipelineResponse
|
||||
* @param compatResponse - A response compatible with `HttpOperationResponse` from core-http.
|
||||
*/
|
||||
export function toPipelineResponse(compatResponse) {
|
||||
const extendedCompatResponse = compatResponse;
|
||||
const response = extendedCompatResponse[originalResponse];
|
||||
const headers = createHttpHeaders(compatResponse.headers.toJson({ preserveCase: true }));
|
||||
if (response) {
|
||||
response.headers = headers;
|
||||
return response;
|
||||
}
|
||||
else {
|
||||
return {
|
||||
...compatResponse,
|
||||
headers,
|
||||
request: toPipelineRequest(compatResponse.request),
|
||||
};
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=response.js.map
|
||||
1
backend/node_modules/@azure/core-http-compat/dist/browser/response.js.map
generated
vendored
Normal file
1
backend/node_modules/@azure/core-http-compat/dist/browser/response.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../src/response.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAepF,MAAM,gBAAgB,GAAG,MAAM,CAAC,gCAAgC,CAAC,CAAC;AAGlE;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAC9B,QAA+B,EAC/B,OAAmC;IAEnC,IAAI,OAAO,GAAG,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAClD,IAAI,OAAO,GAAG,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAClD,IAAI,OAAO,EAAE,WAAW,EAAE,CAAC;QACzB,OAAO,IAAI,KAAK,CAAC,QAAQ,EAAE;YACzB,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ;gBACxB,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;oBACvB,OAAO,OAAO,CAAC;gBACjB,CAAC;qBAAM,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;oBAC9B,OAAO,OAAO,CAAC;gBACjB,CAAC;qBAAM,IAAI,IAAI,KAAK,gBAAgB,EAAE,CAAC;oBACrC,OAAO,QAAQ,CAAC;gBAClB,CAAC;gBACD,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;YAC7C,CAAC;YACD,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ;gBAC/B,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;oBACvB,OAAO,GAAG,KAAK,CAAC;gBAClB,CAAC;qBAAM,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;oBAC9B,OAAO,GAAG,KAAK,CAAC;gBAClB,CAAC;gBACD,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;YACpD,CAAC;SACF,CAA8B,CAAC;IAClC,CAAC;SAAM,CAAC;QACN,OAAO;YACL,GAAG,QAAQ;YACX,OAAO;YACP,OAAO;SACR,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,cAA8B;IAC/D,MAAM,sBAAsB,GAAG,cAAwC,CAAC;IACxE,MAAM,QAAQ,GAAG,sBAAsB,CAAC,gBAAgB,CAAC,CAAC;IAC1D,MAAM,OAAO,GAAG,iBAAiB,CAAC,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACzF,IAAI,QAAQ,EAAE,CAAC;QACb,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC;QAC3B,OAAO,QAAQ,CAAC;IAClB,CAAC;SAAM,CAAC;QACN,OAAO;YACL,GAAG,cAAc;YACjB,OAAO;YACP,OAAO,EAAE,iBAAiB,CAAC,cAAc,CAAC,OAAO,CAAC;SACnD,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { FullOperationResponse } from \"@azure/core-client\";\nimport type { PipelineResponse } from \"@azure/core-rest-pipeline\";\nimport { createHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport type { HttpHeadersLike, WebResourceLike } from \"./util.js\";\nimport { toHttpHeadersLike, toPipelineRequest, toWebResourceLike } from \"./util.js\";\n/**\n * Http Response that is compatible with the core-v1(core-http).\n */\nexport interface CompatResponse extends Omit<FullOperationResponse, \"request\" | \"headers\"> {\n /**\n * A description of a HTTP request to be made to a remote server.\n */\n request: WebResourceLike;\n /**\n * A collection of HTTP header key/value pairs.\n */\n headers: HttpHeadersLike;\n}\n\nconst originalResponse = Symbol(\"Original FullOperationResponse\");\ntype ExtendedCompatResponse = CompatResponse & { [originalResponse]?: FullOperationResponse };\n\n/**\n * A helper to convert response objects from the new pipeline back to the old one.\n * @param response - A response object from core-client.\n * @returns A response compatible with `HttpOperationResponse` from core-http.\n */\nexport function toCompatResponse(\n response: FullOperationResponse,\n options?: { createProxy?: boolean },\n): CompatResponse {\n let request = toWebResourceLike(response.request);\n let headers = toHttpHeadersLike(response.headers);\n if (options?.createProxy) {\n return new Proxy(response, {\n get(target, prop, receiver) {\n if (prop === \"headers\") {\n return headers;\n } else if (prop === \"request\") {\n return request;\n } else if (prop === originalResponse) {\n return response;\n }\n return Reflect.get(target, prop, receiver);\n },\n set(target, prop, value, receiver) {\n if (prop === \"headers\") {\n headers = value;\n } else if (prop === \"request\") {\n request = value;\n }\n return Reflect.set(target, prop, value, receiver);\n },\n }) as unknown as CompatResponse;\n } else {\n return {\n ...response,\n request,\n headers,\n };\n }\n}\n\n/**\n * A helper to convert back to a PipelineResponse\n * @param compatResponse - A response compatible with `HttpOperationResponse` from core-http.\n */\nexport function toPipelineResponse(compatResponse: CompatResponse): PipelineResponse {\n const extendedCompatResponse = compatResponse as ExtendedCompatResponse;\n const response = extendedCompatResponse[originalResponse];\n const headers = createHttpHeaders(compatResponse.headers.toJson({ preserveCase: true }));\n if (response) {\n response.headers = headers;\n return response;\n } else {\n return {\n ...compatResponse,\n headers,\n request: toPipelineRequest(compatResponse.request),\n };\n }\n}\n"]}
|
||||
298
backend/node_modules/@azure/core-http-compat/dist/browser/util.d.ts
generated
vendored
Normal file
298
backend/node_modules/@azure/core-http-compat/dist/browser/util.d.ts
generated
vendored
Normal file
@ -0,0 +1,298 @@
|
||||
import type { HttpMethods, ProxySettings } from "@azure/core-rest-pipeline";
|
||||
import type { AbortSignalLike } from "@azure/abort-controller";
|
||||
import type { HttpHeaders as HttpHeadersV2, PipelineRequest } from "@azure/core-rest-pipeline";
|
||||
export declare function toPipelineRequest(webResource: WebResourceLike, options?: {
|
||||
originalRequest?: PipelineRequest;
|
||||
}): PipelineRequest;
|
||||
export declare function toWebResourceLike(request: PipelineRequest, options?: {
|
||||
createProxy?: boolean;
|
||||
originalRequest?: PipelineRequest;
|
||||
}): WebResourceLike;
|
||||
/**
|
||||
* Converts HttpHeaders from core-rest-pipeline to look like
|
||||
* HttpHeaders from core-http.
|
||||
* @param headers - HttpHeaders from core-rest-pipeline
|
||||
* @returns HttpHeaders as they looked in core-http
|
||||
*/
|
||||
export declare function toHttpHeadersLike(headers: HttpHeadersV2): HttpHeadersLike;
|
||||
/**
|
||||
* An individual header within a HttpHeaders collection.
|
||||
*/
|
||||
export interface HttpHeader {
|
||||
/**
|
||||
* The name of the header.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The value of the header.
|
||||
*/
|
||||
value: string;
|
||||
}
|
||||
/**
|
||||
* A HttpHeaders collection represented as a simple JSON object.
|
||||
*/
|
||||
export type RawHttpHeaders = {
|
||||
[headerName: string]: string;
|
||||
};
|
||||
/**
|
||||
* A collection of HTTP header key/value pairs.
|
||||
*/
|
||||
export interface HttpHeadersLike {
|
||||
/**
|
||||
* Set a header in this collection with the provided name and value. The name is
|
||||
* case-insensitive.
|
||||
* @param headerName - The name of the header to set. This value is case-insensitive.
|
||||
* @param headerValue - The value of the header to set.
|
||||
*/
|
||||
set(headerName: string, headerValue: string | number): void;
|
||||
/**
|
||||
* Get the header value for the provided header name, or undefined if no header exists in this
|
||||
* collection with the provided name.
|
||||
* @param headerName - The name of the header.
|
||||
*/
|
||||
get(headerName: string): string | undefined;
|
||||
/**
|
||||
* Get whether or not this header collection contains a header entry for the provided header name.
|
||||
*/
|
||||
contains(headerName: string): boolean;
|
||||
/**
|
||||
* Remove the header with the provided headerName. Return whether or not the header existed and
|
||||
* was removed.
|
||||
* @param headerName - The name of the header to remove.
|
||||
*/
|
||||
remove(headerName: string): boolean;
|
||||
/**
|
||||
* Get the headers that are contained this collection as an object.
|
||||
*/
|
||||
rawHeaders(): RawHttpHeaders;
|
||||
/**
|
||||
* Get the headers that are contained in this collection as an array.
|
||||
*/
|
||||
headersArray(): HttpHeader[];
|
||||
/**
|
||||
* Get the header names that are contained in this collection.
|
||||
*/
|
||||
headerNames(): string[];
|
||||
/**
|
||||
* Get the header values that are contained in this collection.
|
||||
*/
|
||||
headerValues(): string[];
|
||||
/**
|
||||
* Create a deep clone/copy of this HttpHeaders collection.
|
||||
*/
|
||||
clone(): HttpHeadersLike;
|
||||
/**
|
||||
* Get the JSON object representation of this HTTP header collection.
|
||||
* The result is the same as `rawHeaders()`.
|
||||
*/
|
||||
toJson(options?: {
|
||||
preserveCase?: boolean;
|
||||
}): RawHttpHeaders;
|
||||
}
|
||||
/**
|
||||
* A collection of HTTP header key/value pairs.
|
||||
*/
|
||||
export declare class HttpHeaders implements HttpHeadersLike {
|
||||
private readonly _headersMap;
|
||||
constructor(rawHeaders?: RawHttpHeaders);
|
||||
/**
|
||||
* Set a header in this collection with the provided name and value. The name is
|
||||
* case-insensitive.
|
||||
* @param headerName - The name of the header to set. This value is case-insensitive.
|
||||
* @param headerValue - The value of the header to set.
|
||||
*/
|
||||
set(headerName: string, headerValue: string | number): void;
|
||||
/**
|
||||
* Get the header value for the provided header name, or undefined if no header exists in this
|
||||
* collection with the provided name.
|
||||
* @param headerName - The name of the header.
|
||||
*/
|
||||
get(headerName: string): string | undefined;
|
||||
/**
|
||||
* Get whether or not this header collection contains a header entry for the provided header name.
|
||||
*/
|
||||
contains(headerName: string): boolean;
|
||||
/**
|
||||
* Remove the header with the provided headerName. Return whether or not the header existed and
|
||||
* was removed.
|
||||
* @param headerName - The name of the header to remove.
|
||||
*/
|
||||
remove(headerName: string): boolean;
|
||||
/**
|
||||
* Get the headers that are contained this collection as an object.
|
||||
*/
|
||||
rawHeaders(): RawHttpHeaders;
|
||||
/**
|
||||
* Get the headers that are contained in this collection as an array.
|
||||
*/
|
||||
headersArray(): HttpHeader[];
|
||||
/**
|
||||
* Get the header names that are contained in this collection.
|
||||
*/
|
||||
headerNames(): string[];
|
||||
/**
|
||||
* Get the header values that are contained in this collection.
|
||||
*/
|
||||
headerValues(): string[];
|
||||
/**
|
||||
* Get the JSON object representation of this HTTP header collection.
|
||||
*/
|
||||
toJson(options?: {
|
||||
preserveCase?: boolean;
|
||||
}): RawHttpHeaders;
|
||||
/**
|
||||
* Get the string representation of this HTTP header collection.
|
||||
*/
|
||||
toString(): string;
|
||||
/**
|
||||
* Create a deep clone/copy of this HttpHeaders collection.
|
||||
*/
|
||||
clone(): HttpHeaders;
|
||||
}
|
||||
/**
|
||||
* An interface compatible with NodeJS's `http.Agent`.
|
||||
* We want to avoid publicly re-exporting the actual interface,
|
||||
* since it might vary across runtime versions.
|
||||
*/
|
||||
export interface Agent {
|
||||
/**
|
||||
* Destroy any sockets that are currently in use by the agent.
|
||||
*/
|
||||
destroy(): void;
|
||||
/**
|
||||
* For agents with keepAlive enabled, this sets the maximum number of sockets that will be left open in the free state.
|
||||
*/
|
||||
maxFreeSockets: number;
|
||||
/**
|
||||
* Determines how many concurrent sockets the agent can have open per origin.
|
||||
*/
|
||||
maxSockets: number;
|
||||
/**
|
||||
* An object which contains queues of requests that have not yet been assigned to sockets.
|
||||
*/
|
||||
requests: unknown;
|
||||
/**
|
||||
* An object which contains arrays of sockets currently in use by the agent.
|
||||
*/
|
||||
sockets: unknown;
|
||||
}
|
||||
/**
|
||||
* A description of a HTTP request to be made to a remote server.
|
||||
*/
|
||||
export interface WebResourceLike {
|
||||
/**
|
||||
* The URL being accessed by the request.
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
* The HTTP method to use when making the request.
|
||||
*/
|
||||
method: HttpMethods;
|
||||
/**
|
||||
* The HTTP body contents of the request.
|
||||
*/
|
||||
body?: any;
|
||||
/**
|
||||
* The HTTP headers to use when making the request.
|
||||
*/
|
||||
headers: HttpHeadersLike;
|
||||
/**
|
||||
* Whether or not the body of the HttpOperationResponse should be treated as a stream.
|
||||
* @deprecated Use streamResponseStatusCodes property instead.
|
||||
*/
|
||||
streamResponseBody?: boolean;
|
||||
/**
|
||||
* A list of response status codes whose corresponding HttpOperationResponse body should be treated as a stream.
|
||||
*/
|
||||
streamResponseStatusCodes?: Set<number>;
|
||||
/**
|
||||
* Form data, used to build the request body.
|
||||
*/
|
||||
formData?: any;
|
||||
/**
|
||||
* A query string represented as an object.
|
||||
*/
|
||||
query?: {
|
||||
[key: string]: any;
|
||||
};
|
||||
/**
|
||||
* If credentials (cookies) should be sent along during an XHR.
|
||||
*/
|
||||
withCredentials: boolean;
|
||||
/**
|
||||
* The number of milliseconds a request can take before automatically being terminated.
|
||||
* If the request is terminated, an `AbortError` is thrown.
|
||||
*/
|
||||
timeout: number;
|
||||
/**
|
||||
* Proxy configuration.
|
||||
*/
|
||||
proxySettings?: ProxySettings;
|
||||
/**
|
||||
* If the connection should be reused.
|
||||
*/
|
||||
keepAlive?: boolean;
|
||||
/**
|
||||
* Whether or not to decompress response according to Accept-Encoding header (node-fetch only)
|
||||
*/
|
||||
decompressResponse?: boolean;
|
||||
/**
|
||||
* A unique identifier for the request. Used for logging and tracing.
|
||||
*/
|
||||
requestId: string;
|
||||
/**
|
||||
* Signal of an abort controller. Can be used to abort both sending a network request and waiting for a response.
|
||||
*/
|
||||
abortSignal?: AbortSignalLike;
|
||||
/**
|
||||
* Callback which fires upon upload progress.
|
||||
*/
|
||||
onUploadProgress?: (progress: TransferProgressEvent) => void;
|
||||
/** Callback which fires upon download progress. */
|
||||
onDownloadProgress?: (progress: TransferProgressEvent) => void;
|
||||
/**
|
||||
* NODEJS ONLY
|
||||
*
|
||||
* A Node-only option to provide a custom `http.Agent`/`https.Agent`.
|
||||
* NOTE: usually this should be one instance shared by multiple requests so that the underlying
|
||||
* connection to the service can be reused.
|
||||
* Does nothing when running in the browser.
|
||||
*/
|
||||
agent?: Agent;
|
||||
/**
|
||||
* Additional options to set on the request. This provides a way to override
|
||||
* existing ones or provide request properties that are not declared.
|
||||
*
|
||||
* For possible valid properties, see
|
||||
* - NodeJS https.request options: https://nodejs.org/api/http.html#httprequestoptions-callback
|
||||
* - Browser RequestInit: https://developer.mozilla.org/en-US/docs/Web/API/RequestInit
|
||||
*
|
||||
* WARNING: Options specified here will override any properties of same names when request is sent by {@link HttpClient}.
|
||||
*/
|
||||
requestOverrides?: Record<string, unknown>;
|
||||
/**
|
||||
* Clone this request object.
|
||||
*/
|
||||
clone(): WebResourceLike;
|
||||
/**
|
||||
* Validates that the required properties such as method, url, headers["Content-Type"],
|
||||
* headers["accept-language"] are defined. It will throw an error if one of the above
|
||||
* mentioned properties are not defined.
|
||||
* Note: this a no-op for compat purposes.
|
||||
*/
|
||||
validateRequestProperties(): void;
|
||||
/**
|
||||
* This is a no-op for compat purposes and will throw if called.
|
||||
*/
|
||||
prepare(options: unknown): WebResourceLike;
|
||||
}
|
||||
/**
|
||||
* Fired in response to upload or download progress.
|
||||
*/
|
||||
export type TransferProgressEvent = {
|
||||
/**
|
||||
* The number of bytes loaded so far.
|
||||
*/
|
||||
loadedBytes: number;
|
||||
};
|
||||
//# sourceMappingURL=util.d.ts.map
|
||||
262
backend/node_modules/@azure/core-http-compat/dist/browser/util.js
generated
vendored
Normal file
262
backend/node_modules/@azure/core-http-compat/dist/browser/util.js
generated
vendored
Normal file
@ -0,0 +1,262 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { createHttpHeaders, createPipelineRequest } from "@azure/core-rest-pipeline";
|
||||
// We use a custom symbol to cache a reference to the original request without
|
||||
// exposing it on the public interface.
|
||||
const originalRequestSymbol = Symbol("Original PipelineRequest");
|
||||
// Symbol.for() will return the same symbol if it's already been created
|
||||
// This particular one is used in core-client to handle the case of when a request is
|
||||
// cloned but we need to retrieve the OperationSpec and OperationArguments from the
|
||||
// original request.
|
||||
const originalClientRequestSymbol = Symbol.for("@azure/core-client original request");
|
||||
export function toPipelineRequest(webResource, options = {}) {
|
||||
const compatWebResource = webResource;
|
||||
const request = compatWebResource[originalRequestSymbol];
|
||||
const headers = createHttpHeaders(webResource.headers.toJson({ preserveCase: true }));
|
||||
if (request) {
|
||||
request.headers = headers;
|
||||
return request;
|
||||
}
|
||||
else {
|
||||
const newRequest = createPipelineRequest({
|
||||
url: webResource.url,
|
||||
method: webResource.method,
|
||||
headers,
|
||||
withCredentials: webResource.withCredentials,
|
||||
timeout: webResource.timeout,
|
||||
requestId: webResource.requestId,
|
||||
abortSignal: webResource.abortSignal,
|
||||
body: webResource.body,
|
||||
formData: webResource.formData,
|
||||
disableKeepAlive: !!webResource.keepAlive,
|
||||
onDownloadProgress: webResource.onDownloadProgress,
|
||||
onUploadProgress: webResource.onUploadProgress,
|
||||
proxySettings: webResource.proxySettings,
|
||||
streamResponseStatusCodes: webResource.streamResponseStatusCodes,
|
||||
agent: webResource.agent,
|
||||
requestOverrides: webResource.requestOverrides,
|
||||
});
|
||||
if (options.originalRequest) {
|
||||
newRequest[originalClientRequestSymbol] =
|
||||
options.originalRequest;
|
||||
}
|
||||
return newRequest;
|
||||
}
|
||||
}
|
||||
export function toWebResourceLike(request, options) {
|
||||
const originalRequest = options?.originalRequest ?? request;
|
||||
const webResource = {
|
||||
url: request.url,
|
||||
method: request.method,
|
||||
headers: toHttpHeadersLike(request.headers),
|
||||
withCredentials: request.withCredentials,
|
||||
timeout: request.timeout,
|
||||
requestId: request.headers.get("x-ms-client-request-id") || request.requestId,
|
||||
abortSignal: request.abortSignal,
|
||||
body: request.body,
|
||||
formData: request.formData,
|
||||
keepAlive: !!request.disableKeepAlive,
|
||||
onDownloadProgress: request.onDownloadProgress,
|
||||
onUploadProgress: request.onUploadProgress,
|
||||
proxySettings: request.proxySettings,
|
||||
streamResponseStatusCodes: request.streamResponseStatusCodes,
|
||||
agent: request.agent,
|
||||
requestOverrides: request.requestOverrides,
|
||||
clone() {
|
||||
throw new Error("Cannot clone a non-proxied WebResourceLike");
|
||||
},
|
||||
prepare() {
|
||||
throw new Error("WebResourceLike.prepare() is not supported by @azure/core-http-compat");
|
||||
},
|
||||
validateRequestProperties() {
|
||||
/** do nothing */
|
||||
},
|
||||
};
|
||||
if (options?.createProxy) {
|
||||
return new Proxy(webResource, {
|
||||
get(target, prop, receiver) {
|
||||
if (prop === originalRequestSymbol) {
|
||||
return request;
|
||||
}
|
||||
else if (prop === "clone") {
|
||||
return () => {
|
||||
return toWebResourceLike(toPipelineRequest(webResource, { originalRequest }), {
|
||||
createProxy: true,
|
||||
originalRequest,
|
||||
});
|
||||
};
|
||||
}
|
||||
return Reflect.get(target, prop, receiver);
|
||||
},
|
||||
set(target, prop, value, receiver) {
|
||||
if (prop === "keepAlive") {
|
||||
request.disableKeepAlive = !value;
|
||||
}
|
||||
const passThroughProps = [
|
||||
"url",
|
||||
"method",
|
||||
"withCredentials",
|
||||
"timeout",
|
||||
"requestId",
|
||||
"abortSignal",
|
||||
"body",
|
||||
"formData",
|
||||
"onDownloadProgress",
|
||||
"onUploadProgress",
|
||||
"proxySettings",
|
||||
"streamResponseStatusCodes",
|
||||
"agent",
|
||||
"requestOverrides",
|
||||
];
|
||||
if (typeof prop === "string" && passThroughProps.includes(prop)) {
|
||||
request[prop] = value;
|
||||
}
|
||||
return Reflect.set(target, prop, value, receiver);
|
||||
},
|
||||
});
|
||||
}
|
||||
else {
|
||||
return webResource;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Converts HttpHeaders from core-rest-pipeline to look like
|
||||
* HttpHeaders from core-http.
|
||||
* @param headers - HttpHeaders from core-rest-pipeline
|
||||
* @returns HttpHeaders as they looked in core-http
|
||||
*/
|
||||
export function toHttpHeadersLike(headers) {
|
||||
return new HttpHeaders(headers.toJSON({ preserveCase: true }));
|
||||
}
|
||||
/**
|
||||
* A collection of HttpHeaders that can be sent with a HTTP request.
|
||||
*/
|
||||
function getHeaderKey(headerName) {
|
||||
return headerName.toLowerCase();
|
||||
}
|
||||
/**
|
||||
* A collection of HTTP header key/value pairs.
|
||||
*/
|
||||
export class HttpHeaders {
|
||||
_headersMap;
|
||||
constructor(rawHeaders) {
|
||||
this._headersMap = {};
|
||||
if (rawHeaders) {
|
||||
for (const headerName in rawHeaders) {
|
||||
this.set(headerName, rawHeaders[headerName]);
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Set a header in this collection with the provided name and value. The name is
|
||||
* case-insensitive.
|
||||
* @param headerName - The name of the header to set. This value is case-insensitive.
|
||||
* @param headerValue - The value of the header to set.
|
||||
*/
|
||||
set(headerName, headerValue) {
|
||||
this._headersMap[getHeaderKey(headerName)] = {
|
||||
name: headerName,
|
||||
value: headerValue.toString(),
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Get the header value for the provided header name, or undefined if no header exists in this
|
||||
* collection with the provided name.
|
||||
* @param headerName - The name of the header.
|
||||
*/
|
||||
get(headerName) {
|
||||
const header = this._headersMap[getHeaderKey(headerName)];
|
||||
return !header ? undefined : header.value;
|
||||
}
|
||||
/**
|
||||
* Get whether or not this header collection contains a header entry for the provided header name.
|
||||
*/
|
||||
contains(headerName) {
|
||||
return !!this._headersMap[getHeaderKey(headerName)];
|
||||
}
|
||||
/**
|
||||
* Remove the header with the provided headerName. Return whether or not the header existed and
|
||||
* was removed.
|
||||
* @param headerName - The name of the header to remove.
|
||||
*/
|
||||
remove(headerName) {
|
||||
const result = this.contains(headerName);
|
||||
delete this._headersMap[getHeaderKey(headerName)];
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* Get the headers that are contained this collection as an object.
|
||||
*/
|
||||
rawHeaders() {
|
||||
return this.toJson({ preserveCase: true });
|
||||
}
|
||||
/**
|
||||
* Get the headers that are contained in this collection as an array.
|
||||
*/
|
||||
headersArray() {
|
||||
const headers = [];
|
||||
for (const headerKey in this._headersMap) {
|
||||
headers.push(this._headersMap[headerKey]);
|
||||
}
|
||||
return headers;
|
||||
}
|
||||
/**
|
||||
* Get the header names that are contained in this collection.
|
||||
*/
|
||||
headerNames() {
|
||||
const headerNames = [];
|
||||
const headers = this.headersArray();
|
||||
for (let i = 0; i < headers.length; ++i) {
|
||||
headerNames.push(headers[i].name);
|
||||
}
|
||||
return headerNames;
|
||||
}
|
||||
/**
|
||||
* Get the header values that are contained in this collection.
|
||||
*/
|
||||
headerValues() {
|
||||
const headerValues = [];
|
||||
const headers = this.headersArray();
|
||||
for (let i = 0; i < headers.length; ++i) {
|
||||
headerValues.push(headers[i].value);
|
||||
}
|
||||
return headerValues;
|
||||
}
|
||||
/**
|
||||
* Get the JSON object representation of this HTTP header collection.
|
||||
*/
|
||||
toJson(options = {}) {
|
||||
const result = {};
|
||||
if (options.preserveCase) {
|
||||
for (const headerKey in this._headersMap) {
|
||||
const header = this._headersMap[headerKey];
|
||||
result[header.name] = header.value;
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (const headerKey in this._headersMap) {
|
||||
const header = this._headersMap[headerKey];
|
||||
result[getHeaderKey(header.name)] = header.value;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* Get the string representation of this HTTP header collection.
|
||||
*/
|
||||
toString() {
|
||||
return JSON.stringify(this.toJson({ preserveCase: true }));
|
||||
}
|
||||
/**
|
||||
* Create a deep clone/copy of this HttpHeaders collection.
|
||||
*/
|
||||
clone() {
|
||||
const resultPreservingCasing = {};
|
||||
for (const headerKey in this._headersMap) {
|
||||
const header = this._headersMap[headerKey];
|
||||
resultPreservingCasing[header.name] = header.value;
|
||||
}
|
||||
return new HttpHeaders(resultPreservingCasing);
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=util.js.map
|
||||
1
backend/node_modules/@azure/core-http-compat/dist/browser/util.js.map
generated
vendored
Normal file
1
backend/node_modules/@azure/core-http-compat/dist/browser/util.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
40
backend/node_modules/@azure/core-http-compat/dist/commonjs/extendedClient.d.ts
generated
vendored
Normal file
40
backend/node_modules/@azure/core-http-compat/dist/commonjs/extendedClient.d.ts
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
import type { KeepAliveOptions } from "./policies/keepAliveOptions.js";
|
||||
import type { RedirectOptions } from "./policies/redirectOptions.js";
|
||||
import type { CommonClientOptions, OperationArguments, OperationSpec, ServiceClientOptions } from "@azure/core-client";
|
||||
import { ServiceClient } from "@azure/core-client";
|
||||
/**
|
||||
* Options specific to Shim Clients.
|
||||
*/
|
||||
export interface ExtendedClientOptions {
|
||||
/**
|
||||
* Options to disable keep alive.
|
||||
*/
|
||||
keepAliveOptions?: KeepAliveOptions;
|
||||
/**
|
||||
* Options to redirect requests.
|
||||
*/
|
||||
redirectOptions?: RedirectOptions;
|
||||
}
|
||||
/**
|
||||
* Options that shim clients are expected to expose.
|
||||
*/
|
||||
export type ExtendedServiceClientOptions = ServiceClientOptions & ExtendedClientOptions;
|
||||
/**
|
||||
* The common set of options that custom shim clients are expected to expose.
|
||||
*/
|
||||
export type ExtendedCommonClientOptions = CommonClientOptions & ExtendedClientOptions;
|
||||
/**
|
||||
* Client to provide compatability between core V1 & V2.
|
||||
*/
|
||||
export declare class ExtendedServiceClient extends ServiceClient {
|
||||
constructor(options: ExtendedServiceClientOptions);
|
||||
/**
|
||||
* Compatible send operation request function.
|
||||
*
|
||||
* @param operationArguments - Operation arguments
|
||||
* @param operationSpec - Operation Spec
|
||||
* @returns
|
||||
*/
|
||||
sendOperationRequest<T>(operationArguments: OperationArguments, operationSpec: OperationSpec): Promise<T>;
|
||||
}
|
||||
//# sourceMappingURL=extendedClient.d.ts.map
|
||||
72
backend/node_modules/@azure/core-http-compat/dist/commonjs/extendedClient.js
generated
vendored
Normal file
72
backend/node_modules/@azure/core-http-compat/dist/commonjs/extendedClient.js
generated
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var extendedClient_exports = {};
|
||||
__export(extendedClient_exports, {
|
||||
ExtendedServiceClient: () => ExtendedServiceClient
|
||||
});
|
||||
module.exports = __toCommonJS(extendedClient_exports);
|
||||
var import_disableKeepAlivePolicy = require("./policies/disableKeepAlivePolicy.js");
|
||||
var import_core_rest_pipeline = require("@azure/core-rest-pipeline");
|
||||
var import_core_client = require("@azure/core-client");
|
||||
var import_response = require("./response.js");
|
||||
class ExtendedServiceClient extends import_core_client.ServiceClient {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
if (options.keepAliveOptions?.enable === false && !(0, import_disableKeepAlivePolicy.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) {
|
||||
this.pipeline.addPolicy((0, import_disableKeepAlivePolicy.createDisableKeepAlivePolicy)());
|
||||
}
|
||||
if (options.redirectOptions?.handleRedirects === false) {
|
||||
this.pipeline.removePolicy({
|
||||
name: import_core_rest_pipeline.redirectPolicyName
|
||||
});
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Compatible send operation request function.
|
||||
*
|
||||
* @param operationArguments - Operation arguments
|
||||
* @param operationSpec - Operation Spec
|
||||
* @returns
|
||||
*/
|
||||
async sendOperationRequest(operationArguments, operationSpec) {
|
||||
const userProvidedCallBack = operationArguments?.options?.onResponse;
|
||||
let lastResponse;
|
||||
function onResponse(rawResponse, flatResponse, error) {
|
||||
lastResponse = rawResponse;
|
||||
if (userProvidedCallBack) {
|
||||
userProvidedCallBack(rawResponse, flatResponse, error);
|
||||
}
|
||||
}
|
||||
operationArguments.options = {
|
||||
...operationArguments.options,
|
||||
onResponse
|
||||
};
|
||||
const result = await super.sendOperationRequest(operationArguments, operationSpec);
|
||||
if (lastResponse) {
|
||||
Object.defineProperty(result, "_response", {
|
||||
value: (0, import_response.toCompatResponse)(lastResponse)
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
ExtendedServiceClient
|
||||
});
|
||||
//# sourceMappingURL=extendedClient.js.map
|
||||
7
backend/node_modules/@azure/core-http-compat/dist/commonjs/extendedClient.js.map
generated
vendored
Normal file
7
backend/node_modules/@azure/core-http-compat/dist/commonjs/extendedClient.js.map
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../src/extendedClient.ts"],
|
||||
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { KeepAliveOptions } from \"./policies/keepAliveOptions.js\";\nimport {\n createDisableKeepAlivePolicy,\n pipelineContainsDisableKeepAlivePolicy,\n} from \"./policies/disableKeepAlivePolicy.js\";\nimport type { RedirectOptions } from \"./policies/redirectOptions.js\";\nimport { redirectPolicyName } from \"@azure/core-rest-pipeline\";\nimport type {\n CommonClientOptions,\n FullOperationResponse,\n OperationArguments,\n OperationSpec,\n RawResponseCallback,\n ServiceClientOptions,\n} from \"@azure/core-client\";\nimport { ServiceClient } from \"@azure/core-client\";\nimport { toCompatResponse } from \"./response.js\";\n\n/**\n * Options specific to Shim Clients.\n */\nexport interface ExtendedClientOptions {\n /**\n * Options to disable keep alive.\n */\n keepAliveOptions?: KeepAliveOptions;\n /**\n * Options to redirect requests.\n */\n redirectOptions?: RedirectOptions;\n}\n\n/**\n * Options that shim clients are expected to expose.\n */\nexport type ExtendedServiceClientOptions = ServiceClientOptions & ExtendedClientOptions;\n\n/**\n * The common set of options that custom shim clients are expected to expose.\n */\nexport type ExtendedCommonClientOptions = CommonClientOptions & ExtendedClientOptions;\n\n/**\n * Client to provide compatability between core V1 & V2.\n */\nexport class ExtendedServiceClient extends ServiceClient {\n constructor(options: ExtendedServiceClientOptions) {\n super(options);\n\n if (\n options.keepAliveOptions?.enable === false &&\n !pipelineContainsDisableKeepAlivePolicy(this.pipeline)\n ) {\n this.pipeline.addPolicy(createDisableKeepAlivePolicy());\n }\n\n if (options.redirectOptions?.handleRedirects === false) {\n this.pipeline.removePolicy({\n name: redirectPolicyName,\n });\n }\n }\n\n /**\n * Compatible send operation request function.\n *\n * @param operationArguments - Operation arguments\n * @param operationSpec - Operation Spec\n * @returns\n */\n async sendOperationRequest<T>(\n operationArguments: OperationArguments,\n operationSpec: OperationSpec,\n ): Promise<T> {\n const userProvidedCallBack: RawResponseCallback | undefined =\n operationArguments?.options?.onResponse;\n\n let lastResponse: FullOperationResponse | undefined;\n\n function onResponse(\n rawResponse: FullOperationResponse,\n flatResponse: unknown,\n error?: unknown,\n ): void {\n lastResponse = rawResponse;\n if (userProvidedCallBack) {\n userProvidedCallBack(rawResponse, flatResponse, error);\n }\n }\n\n operationArguments.options = {\n ...operationArguments.options,\n onResponse,\n };\n\n const result: T = await super.sendOperationRequest(operationArguments, operationSpec);\n\n if (lastResponse) {\n Object.defineProperty(result, \"_response\", {\n value: toCompatResponse(lastResponse),\n });\n }\n\n return result;\n }\n}\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,oCAGO;AAEP,gCAAmC;AASnC,yBAA8B;AAC9B,sBAAiC;AA6B1B,MAAM,8BAA8B,iCAAc;AAAA,EACvD,YAAY,SAAuC;AACjD,UAAM,OAAO;AAEb,QACE,QAAQ,kBAAkB,WAAW,SACrC,KAAC,sEAAuC,KAAK,QAAQ,GACrD;AACA,WAAK,SAAS,cAAU,4DAA6B,CAAC;AAAA,IACxD;AAEA,QAAI,QAAQ,iBAAiB,oBAAoB,OAAO;AACtD,WAAK,SAAS,aAAa;AAAA,QACzB,MAAM;AAAA,MACR,CAAC;AAAA,IACH;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAM,qBACJ,oBACA,eACY;AACZ,UAAM,uBACJ,oBAAoB,SAAS;AAE/B,QAAI;AAEJ,aAAS,WACP,aACA,cACA,OACM;AACN,qBAAe;AACf,UAAI,sBAAsB;AACxB,6BAAqB,aAAa,cAAc,KAAK;AAAA,MACvD;AAAA,IACF;AAEA,uBAAmB,UAAU;AAAA,MAC3B,GAAG,mBAAmB;AAAA,MACtB;AAAA,IACF;AAEA,UAAM,SAAY,MAAM,MAAM,qBAAqB,oBAAoB,aAAa;AAEpF,QAAI,cAAc;AAChB,aAAO,eAAe,QAAQ,aAAa;AAAA,QACzC,WAAO,kCAAiB,YAAY;AAAA,MACtC,CAAC;AAAA,IACH;AAEA,WAAO;AAAA,EACT;AACF;",
|
||||
"names": []
|
||||
}
|
||||
9
backend/node_modules/@azure/core-http-compat/dist/commonjs/httpClientAdapter.d.ts
generated
vendored
Normal file
9
backend/node_modules/@azure/core-http-compat/dist/commonjs/httpClientAdapter.d.ts
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
import type { HttpClient } from "@azure/core-rest-pipeline";
|
||||
import type { RequestPolicy } from "./policies/requestPolicyFactoryPolicy.js";
|
||||
/**
|
||||
* Converts a RequestPolicy based HttpClient to a PipelineRequest based HttpClient.
|
||||
* @param requestPolicyClient - A HttpClient compatible with core-http
|
||||
* @returns A HttpClient compatible with core-rest-pipeline
|
||||
*/
|
||||
export declare function convertHttpClient(requestPolicyClient: RequestPolicy): HttpClient;
|
||||
//# sourceMappingURL=httpClientAdapter.d.ts.map
|
||||
39
backend/node_modules/@azure/core-http-compat/dist/commonjs/httpClientAdapter.js
generated
vendored
Normal file
39
backend/node_modules/@azure/core-http-compat/dist/commonjs/httpClientAdapter.js
generated
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var httpClientAdapter_exports = {};
|
||||
__export(httpClientAdapter_exports, {
|
||||
convertHttpClient: () => convertHttpClient
|
||||
});
|
||||
module.exports = __toCommonJS(httpClientAdapter_exports);
|
||||
var import_response = require("./response.js");
|
||||
var import_util = require("./util.js");
|
||||
function convertHttpClient(requestPolicyClient) {
|
||||
return {
|
||||
sendRequest: async (request) => {
|
||||
const response = await requestPolicyClient.sendRequest(
|
||||
(0, import_util.toWebResourceLike)(request, { createProxy: true })
|
||||
);
|
||||
return (0, import_response.toPipelineResponse)(response);
|
||||
}
|
||||
};
|
||||
}
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
convertHttpClient
|
||||
});
|
||||
//# sourceMappingURL=httpClientAdapter.js.map
|
||||
7
backend/node_modules/@azure/core-http-compat/dist/commonjs/httpClientAdapter.js.map
generated
vendored
Normal file
7
backend/node_modules/@azure/core-http-compat/dist/commonjs/httpClientAdapter.js.map
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../src/httpClientAdapter.ts"],
|
||||
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { HttpClient, PipelineRequest, PipelineResponse } from \"@azure/core-rest-pipeline\";\nimport type { RequestPolicy } from \"./policies/requestPolicyFactoryPolicy.js\";\nimport { toPipelineResponse } from \"./response.js\";\nimport { toWebResourceLike } from \"./util.js\";\n\n/**\n * Converts a RequestPolicy based HttpClient to a PipelineRequest based HttpClient.\n * @param requestPolicyClient - A HttpClient compatible with core-http\n * @returns A HttpClient compatible with core-rest-pipeline\n */\nexport function convertHttpClient(requestPolicyClient: RequestPolicy): HttpClient {\n return {\n sendRequest: async (request: PipelineRequest): Promise<PipelineResponse> => {\n const response = await requestPolicyClient.sendRequest(\n toWebResourceLike(request, { createProxy: true }),\n );\n return toPipelineResponse(response);\n },\n };\n}\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,sBAAmC;AACnC,kBAAkC;AAO3B,SAAS,kBAAkB,qBAAgD;AAChF,SAAO;AAAA,IACL,aAAa,OAAO,YAAwD;AAC1E,YAAM,WAAW,MAAM,oBAAoB;AAAA,YACzC,+BAAkB,SAAS,EAAE,aAAa,KAAK,CAAC;AAAA,MAClD;AACA,iBAAO,oCAAmB,QAAQ;AAAA,IACpC;AAAA,EACF;AACF;",
|
||||
"names": []
|
||||
}
|
||||
15
backend/node_modules/@azure/core-http-compat/dist/commonjs/index.d.ts
generated
vendored
Normal file
15
backend/node_modules/@azure/core-http-compat/dist/commonjs/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* A Shim Library that provides compatibility between Core V1 & V2 Packages.
|
||||
*
|
||||
* @packageDocumentation
|
||||
*/
|
||||
export { ExtendedServiceClient, type ExtendedServiceClientOptions, type ExtendedCommonClientOptions, type ExtendedClientOptions, } from "./extendedClient.js";
|
||||
export { toCompatResponse } from "./response.js";
|
||||
export type { CompatResponse } from "./response.js";
|
||||
export { requestPolicyFactoryPolicyName, createRequestPolicyFactoryPolicy, type RequestPolicyFactory, type RequestPolicy, type RequestPolicyOptionsLike, HttpPipelineLogLevel, } from "./policies/requestPolicyFactoryPolicy.js";
|
||||
export type { KeepAliveOptions } from "./policies/keepAliveOptions.js";
|
||||
export type { RedirectOptions } from "./policies/redirectOptions.js";
|
||||
export { disableKeepAlivePolicyName } from "./policies/disableKeepAlivePolicy.js";
|
||||
export { convertHttpClient } from "./httpClientAdapter.js";
|
||||
export { type Agent, type WebResourceLike, type HttpHeadersLike, type RawHttpHeaders, type HttpHeader, type TransferProgressEvent, toHttpHeadersLike, } from "./util.js";
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
47
backend/node_modules/@azure/core-http-compat/dist/commonjs/index.js
generated
vendored
Normal file
47
backend/node_modules/@azure/core-http-compat/dist/commonjs/index.js
generated
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var src_exports = {};
|
||||
__export(src_exports, {
|
||||
ExtendedServiceClient: () => import_extendedClient.ExtendedServiceClient,
|
||||
HttpPipelineLogLevel: () => import_requestPolicyFactoryPolicy.HttpPipelineLogLevel,
|
||||
convertHttpClient: () => import_httpClientAdapter.convertHttpClient,
|
||||
createRequestPolicyFactoryPolicy: () => import_requestPolicyFactoryPolicy.createRequestPolicyFactoryPolicy,
|
||||
disableKeepAlivePolicyName: () => import_disableKeepAlivePolicy.disableKeepAlivePolicyName,
|
||||
requestPolicyFactoryPolicyName: () => import_requestPolicyFactoryPolicy.requestPolicyFactoryPolicyName,
|
||||
toCompatResponse: () => import_response.toCompatResponse,
|
||||
toHttpHeadersLike: () => import_util.toHttpHeadersLike
|
||||
});
|
||||
module.exports = __toCommonJS(src_exports);
|
||||
var import_extendedClient = require("./extendedClient.js");
|
||||
var import_response = require("./response.js");
|
||||
var import_requestPolicyFactoryPolicy = require("./policies/requestPolicyFactoryPolicy.js");
|
||||
var import_disableKeepAlivePolicy = require("./policies/disableKeepAlivePolicy.js");
|
||||
var import_httpClientAdapter = require("./httpClientAdapter.js");
|
||||
var import_util = require("./util.js");
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
ExtendedServiceClient,
|
||||
HttpPipelineLogLevel,
|
||||
convertHttpClient,
|
||||
createRequestPolicyFactoryPolicy,
|
||||
disableKeepAlivePolicyName,
|
||||
requestPolicyFactoryPolicyName,
|
||||
toCompatResponse,
|
||||
toHttpHeadersLike
|
||||
});
|
||||
//# sourceMappingURL=index.js.map
|
||||
7
backend/node_modules/@azure/core-http-compat/dist/commonjs/index.js.map
generated
vendored
Normal file
7
backend/node_modules/@azure/core-http-compat/dist/commonjs/index.js.map
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../src/index.ts"],
|
||||
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * A Shim Library that provides compatibility between Core V1 & V2 Packages.\n *\n * @packageDocumentation\n */\nexport {\n ExtendedServiceClient,\n type ExtendedServiceClientOptions,\n type ExtendedCommonClientOptions,\n type ExtendedClientOptions,\n} from \"./extendedClient.js\";\nexport { toCompatResponse } from \"./response.js\";\nexport type { CompatResponse } from \"./response.js\";\nexport {\n requestPolicyFactoryPolicyName,\n createRequestPolicyFactoryPolicy,\n type RequestPolicyFactory,\n type RequestPolicy,\n type RequestPolicyOptionsLike,\n HttpPipelineLogLevel,\n} from \"./policies/requestPolicyFactoryPolicy.js\";\nexport type { KeepAliveOptions } from \"./policies/keepAliveOptions.js\";\nexport type { RedirectOptions } from \"./policies/redirectOptions.js\";\nexport { disableKeepAlivePolicyName } from \"./policies/disableKeepAlivePolicy.js\";\nexport { convertHttpClient } from \"./httpClientAdapter.js\";\nexport {\n type Agent,\n type WebResourceLike,\n type HttpHeadersLike,\n type RawHttpHeaders,\n type HttpHeader,\n type TransferProgressEvent,\n toHttpHeadersLike,\n} from \"./util.js\";\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,4BAKO;AACP,sBAAiC;AAEjC,wCAOO;AAGP,oCAA2C;AAC3C,+BAAkC;AAClC,kBAQO;",
|
||||
"names": []
|
||||
}
|
||||
3
backend/node_modules/@azure/core-http-compat/dist/commonjs/package.json
generated
vendored
Normal file
3
backend/node_modules/@azure/core-http-compat/dist/commonjs/package.json
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "commonjs"
|
||||
}
|
||||
8
backend/node_modules/@azure/core-http-compat/dist/commonjs/policies/disableKeepAlivePolicy.d.ts
generated
vendored
Normal file
8
backend/node_modules/@azure/core-http-compat/dist/commonjs/policies/disableKeepAlivePolicy.d.ts
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import type { Pipeline, PipelinePolicy } from "@azure/core-rest-pipeline";
|
||||
export declare const disableKeepAlivePolicyName = "DisableKeepAlivePolicy";
|
||||
export declare function createDisableKeepAlivePolicy(): PipelinePolicy;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare function pipelineContainsDisableKeepAlivePolicy(pipeline: Pipeline): boolean;
|
||||
//# sourceMappingURL=disableKeepAlivePolicy.d.ts.map
|
||||
44
backend/node_modules/@azure/core-http-compat/dist/commonjs/policies/disableKeepAlivePolicy.js
generated
vendored
Normal file
44
backend/node_modules/@azure/core-http-compat/dist/commonjs/policies/disableKeepAlivePolicy.js
generated
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var disableKeepAlivePolicy_exports = {};
|
||||
__export(disableKeepAlivePolicy_exports, {
|
||||
createDisableKeepAlivePolicy: () => createDisableKeepAlivePolicy,
|
||||
disableKeepAlivePolicyName: () => disableKeepAlivePolicyName,
|
||||
pipelineContainsDisableKeepAlivePolicy: () => pipelineContainsDisableKeepAlivePolicy
|
||||
});
|
||||
module.exports = __toCommonJS(disableKeepAlivePolicy_exports);
|
||||
const disableKeepAlivePolicyName = "DisableKeepAlivePolicy";
|
||||
function createDisableKeepAlivePolicy() {
|
||||
return {
|
||||
name: disableKeepAlivePolicyName,
|
||||
async sendRequest(request, next) {
|
||||
request.disableKeepAlive = true;
|
||||
return next(request);
|
||||
}
|
||||
};
|
||||
}
|
||||
function pipelineContainsDisableKeepAlivePolicy(pipeline) {
|
||||
return pipeline.getOrderedPolicies().some((policy) => policy.name === disableKeepAlivePolicyName);
|
||||
}
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
createDisableKeepAlivePolicy,
|
||||
disableKeepAlivePolicyName,
|
||||
pipelineContainsDisableKeepAlivePolicy
|
||||
});
|
||||
//# sourceMappingURL=disableKeepAlivePolicy.js.map
|
||||
7
backend/node_modules/@azure/core-http-compat/dist/commonjs/policies/disableKeepAlivePolicy.js.map
generated
vendored
Normal file
7
backend/node_modules/@azure/core-http-compat/dist/commonjs/policies/disableKeepAlivePolicy.js.map
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../../src/policies/disableKeepAlivePolicy.ts"],
|
||||
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n Pipeline,\n PipelinePolicy,\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\n\nexport const disableKeepAlivePolicyName = \"DisableKeepAlivePolicy\";\n\nexport function createDisableKeepAlivePolicy(): PipelinePolicy {\n return {\n name: disableKeepAlivePolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise<PipelineResponse> {\n request.disableKeepAlive = true;\n return next(request);\n },\n };\n}\n\n/**\n * @internal\n */\nexport function pipelineContainsDisableKeepAlivePolicy(pipeline: Pipeline): boolean {\n return pipeline.getOrderedPolicies().some((policy) => policy.name === disableKeepAlivePolicyName);\n}\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWO,MAAM,6BAA6B;AAEnC,SAAS,+BAA+C;AAC7D,SAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM,YAAY,SAA0B,MAA8C;AACxF,cAAQ,mBAAmB;AAC3B,aAAO,KAAK,OAAO;AAAA,IACrB;AAAA,EACF;AACF;AAKO,SAAS,uCAAuC,UAA6B;AAClF,SAAO,SAAS,mBAAmB,EAAE,KAAK,CAAC,WAAW,OAAO,SAAS,0BAA0B;AAClG;",
|
||||
"names": []
|
||||
}
|
||||
11
backend/node_modules/@azure/core-http-compat/dist/commonjs/policies/keepAliveOptions.d.ts
generated
vendored
Normal file
11
backend/node_modules/@azure/core-http-compat/dist/commonjs/policies/keepAliveOptions.d.ts
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Keep Alive Options for how HTTP connections.
|
||||
*/
|
||||
export interface KeepAliveOptions {
|
||||
/**
|
||||
* When true, connections will be kept alive for multiple requests.
|
||||
* Defaults to true.
|
||||
*/
|
||||
enable?: boolean;
|
||||
}
|
||||
//# sourceMappingURL=keepAliveOptions.d.ts.map
|
||||
16
backend/node_modules/@azure/core-http-compat/dist/commonjs/policies/keepAliveOptions.js
generated
vendored
Normal file
16
backend/node_modules/@azure/core-http-compat/dist/commonjs/policies/keepAliveOptions.js
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var keepAliveOptions_exports = {};
|
||||
module.exports = __toCommonJS(keepAliveOptions_exports);
|
||||
//# sourceMappingURL=keepAliveOptions.js.map
|
||||
7
backend/node_modules/@azure/core-http-compat/dist/commonjs/policies/keepAliveOptions.js.map
generated
vendored
Normal file
7
backend/node_modules/@azure/core-http-compat/dist/commonjs/policies/keepAliveOptions.js.map
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../../src/policies/keepAliveOptions.ts"],
|
||||
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Keep Alive Options for how HTTP connections.\n */\nexport interface KeepAliveOptions {\n /**\n * When true, connections will be kept alive for multiple requests.\n * Defaults to true.\n */\n enable?: boolean;\n}\n"],
|
||||
"mappings": ";;;;;;;;;;;;;AAAA;AAAA;",
|
||||
"names": []
|
||||
}
|
||||
15
backend/node_modules/@azure/core-http-compat/dist/commonjs/policies/redirectOptions.d.ts
generated
vendored
Normal file
15
backend/node_modules/@azure/core-http-compat/dist/commonjs/policies/redirectOptions.d.ts
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Options for how redirect responses are handled.
|
||||
*/
|
||||
export interface RedirectOptions {
|
||||
/**
|
||||
* When true, redirect responses are followed. Defaults to true.
|
||||
*/
|
||||
handleRedirects?: boolean;
|
||||
/**
|
||||
* The maximum number of times the redirect URL will be tried before
|
||||
* failing. Defaults to 20.
|
||||
*/
|
||||
maxRetries?: number;
|
||||
}
|
||||
//# sourceMappingURL=redirectOptions.d.ts.map
|
||||
16
backend/node_modules/@azure/core-http-compat/dist/commonjs/policies/redirectOptions.js
generated
vendored
Normal file
16
backend/node_modules/@azure/core-http-compat/dist/commonjs/policies/redirectOptions.js
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var redirectOptions_exports = {};
|
||||
module.exports = __toCommonJS(redirectOptions_exports);
|
||||
//# sourceMappingURL=redirectOptions.js.map
|
||||
7
backend/node_modules/@azure/core-http-compat/dist/commonjs/policies/redirectOptions.js.map
generated
vendored
Normal file
7
backend/node_modules/@azure/core-http-compat/dist/commonjs/policies/redirectOptions.js.map
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../../src/policies/redirectOptions.ts"],
|
||||
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Options for how redirect responses are handled.\n */\nexport interface RedirectOptions {\n /**\n * When true, redirect responses are followed. Defaults to true.\n */\n handleRedirects?: boolean;\n\n /**\n * The maximum number of times the redirect URL will be tried before\n * failing. Defaults to 20.\n */\n maxRetries?: number;\n}\n"],
|
||||
"mappings": ";;;;;;;;;;;;;AAAA;AAAA;",
|
||||
"names": []
|
||||
}
|
||||
41
backend/node_modules/@azure/core-http-compat/dist/commonjs/policies/requestPolicyFactoryPolicy.d.ts
generated
vendored
Normal file
41
backend/node_modules/@azure/core-http-compat/dist/commonjs/policies/requestPolicyFactoryPolicy.d.ts
generated
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
import type { PipelinePolicy } from "@azure/core-rest-pipeline";
|
||||
import type { WebResourceLike } from "../util.js";
|
||||
import type { CompatResponse } from "../response.js";
|
||||
/**
|
||||
* A compatible interface for core-http request policies
|
||||
*/
|
||||
export interface RequestPolicy {
|
||||
sendRequest(httpRequest: WebResourceLike): Promise<CompatResponse>;
|
||||
}
|
||||
/**
|
||||
* An enum for compatibility with RequestPolicy
|
||||
*/
|
||||
export declare enum HttpPipelineLogLevel {
|
||||
ERROR = 1,
|
||||
INFO = 3,
|
||||
OFF = 0,
|
||||
WARNING = 2
|
||||
}
|
||||
/**
|
||||
* An interface for compatibility with RequestPolicy
|
||||
*/
|
||||
export interface RequestPolicyOptionsLike {
|
||||
log(logLevel: HttpPipelineLogLevel, message: string): void;
|
||||
shouldLog(logLevel: HttpPipelineLogLevel): boolean;
|
||||
}
|
||||
/**
|
||||
* An interface for compatibility with core-http's RequestPolicyFactory
|
||||
*/
|
||||
export interface RequestPolicyFactory {
|
||||
create(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike): RequestPolicy;
|
||||
}
|
||||
/**
|
||||
* The name of the RequestPolicyFactoryPolicy
|
||||
*/
|
||||
export declare const requestPolicyFactoryPolicyName = "RequestPolicyFactoryPolicy";
|
||||
/**
|
||||
* A policy that wraps policies written for core-http.
|
||||
* @param factories - An array of `RequestPolicyFactory` objects from a core-http pipeline
|
||||
*/
|
||||
export declare function createRequestPolicyFactoryPolicy(factories: RequestPolicyFactory[]): PipelinePolicy;
|
||||
//# sourceMappingURL=requestPolicyFactoryPolicy.d.ts.map
|
||||
68
backend/node_modules/@azure/core-http-compat/dist/commonjs/policies/requestPolicyFactoryPolicy.js
generated
vendored
Normal file
68
backend/node_modules/@azure/core-http-compat/dist/commonjs/policies/requestPolicyFactoryPolicy.js
generated
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var requestPolicyFactoryPolicy_exports = {};
|
||||
__export(requestPolicyFactoryPolicy_exports, {
|
||||
HttpPipelineLogLevel: () => HttpPipelineLogLevel,
|
||||
createRequestPolicyFactoryPolicy: () => createRequestPolicyFactoryPolicy,
|
||||
requestPolicyFactoryPolicyName: () => requestPolicyFactoryPolicyName
|
||||
});
|
||||
module.exports = __toCommonJS(requestPolicyFactoryPolicy_exports);
|
||||
var import_util = require("../util.js");
|
||||
var import_response = require("../response.js");
|
||||
var HttpPipelineLogLevel = /* @__PURE__ */ ((HttpPipelineLogLevel2) => {
|
||||
HttpPipelineLogLevel2[HttpPipelineLogLevel2["ERROR"] = 1] = "ERROR";
|
||||
HttpPipelineLogLevel2[HttpPipelineLogLevel2["INFO"] = 3] = "INFO";
|
||||
HttpPipelineLogLevel2[HttpPipelineLogLevel2["OFF"] = 0] = "OFF";
|
||||
HttpPipelineLogLevel2[HttpPipelineLogLevel2["WARNING"] = 2] = "WARNING";
|
||||
return HttpPipelineLogLevel2;
|
||||
})(HttpPipelineLogLevel || {});
|
||||
const mockRequestPolicyOptions = {
|
||||
log(_logLevel, _message) {
|
||||
},
|
||||
shouldLog(_logLevel) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
const requestPolicyFactoryPolicyName = "RequestPolicyFactoryPolicy";
|
||||
function createRequestPolicyFactoryPolicy(factories) {
|
||||
const orderedFactories = factories.slice().reverse();
|
||||
return {
|
||||
name: requestPolicyFactoryPolicyName,
|
||||
async sendRequest(request, next) {
|
||||
let httpPipeline = {
|
||||
async sendRequest(httpRequest) {
|
||||
const response2 = await next((0, import_util.toPipelineRequest)(httpRequest));
|
||||
return (0, import_response.toCompatResponse)(response2, { createProxy: true });
|
||||
}
|
||||
};
|
||||
for (const factory of orderedFactories) {
|
||||
httpPipeline = factory.create(httpPipeline, mockRequestPolicyOptions);
|
||||
}
|
||||
const webResourceLike = (0, import_util.toWebResourceLike)(request, { createProxy: true });
|
||||
const response = await httpPipeline.sendRequest(webResourceLike);
|
||||
return (0, import_response.toPipelineResponse)(response);
|
||||
}
|
||||
};
|
||||
}
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
HttpPipelineLogLevel,
|
||||
createRequestPolicyFactoryPolicy,
|
||||
requestPolicyFactoryPolicyName
|
||||
});
|
||||
//# sourceMappingURL=requestPolicyFactoryPolicy.js.map
|
||||
7
backend/node_modules/@azure/core-http-compat/dist/commonjs/policies/requestPolicyFactoryPolicy.js.map
generated
vendored
Normal file
7
backend/node_modules/@azure/core-http-compat/dist/commonjs/policies/requestPolicyFactoryPolicy.js.map
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../../src/policies/requestPolicyFactoryPolicy.ts"],
|
||||
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n PipelinePolicy,\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport type { WebResourceLike } from \"../util.js\";\nimport { toPipelineRequest, toWebResourceLike } from \"../util.js\";\nimport type { CompatResponse } from \"../response.js\";\nimport { toCompatResponse, toPipelineResponse } from \"../response.js\";\n\n/**\n * A compatible interface for core-http request policies\n */\nexport interface RequestPolicy {\n sendRequest(httpRequest: WebResourceLike): Promise<CompatResponse>;\n}\n\n/**\n * An enum for compatibility with RequestPolicy\n */\nexport enum HttpPipelineLogLevel {\n ERROR = 1,\n INFO = 3,\n OFF = 0,\n WARNING = 2,\n}\n\n/**\n * An interface for compatibility with RequestPolicy\n */\nexport interface RequestPolicyOptionsLike {\n log(logLevel: HttpPipelineLogLevel, message: string): void;\n shouldLog(logLevel: HttpPipelineLogLevel): boolean;\n}\n\nconst mockRequestPolicyOptions: RequestPolicyOptionsLike = {\n log(_logLevel: HttpPipelineLogLevel, _message: string): void {\n /* do nothing */\n },\n shouldLog(_logLevel: HttpPipelineLogLevel): boolean {\n return false;\n },\n};\n\n/**\n * An interface for compatibility with core-http's RequestPolicyFactory\n */\nexport interface RequestPolicyFactory {\n create(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike): RequestPolicy;\n}\n\n/**\n * The name of the RequestPolicyFactoryPolicy\n */\nexport const requestPolicyFactoryPolicyName = \"RequestPolicyFactoryPolicy\";\n\n/**\n * A policy that wraps policies written for core-http.\n * @param factories - An array of `RequestPolicyFactory` objects from a core-http pipeline\n */\nexport function createRequestPolicyFactoryPolicy(\n factories: RequestPolicyFactory[],\n): PipelinePolicy {\n const orderedFactories = factories.slice().reverse();\n\n return {\n name: requestPolicyFactoryPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise<PipelineResponse> {\n let httpPipeline: RequestPolicy = {\n async sendRequest(httpRequest) {\n const response = await next(toPipelineRequest(httpRequest));\n return toCompatResponse(response, { createProxy: true });\n },\n };\n for (const factory of orderedFactories) {\n httpPipeline = factory.create(httpPipeline, mockRequestPolicyOptions);\n }\n\n const webResourceLike = toWebResourceLike(request, { createProxy: true });\n const response = await httpPipeline.sendRequest(webResourceLike);\n return toPipelineResponse(response);\n },\n };\n}\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,kBAAqD;AAErD,sBAAqD;AAY9C,IAAK,uBAAL,kBAAKA,0BAAL;AACL,EAAAA,4CAAA,WAAQ,KAAR;AACA,EAAAA,4CAAA,UAAO,KAAP;AACA,EAAAA,4CAAA,SAAM,KAAN;AACA,EAAAA,4CAAA,aAAU,KAAV;AAJU,SAAAA;AAAA,GAAA;AAeZ,MAAM,2BAAqD;AAAA,EACzD,IAAI,WAAiC,UAAwB;AAAA,EAE7D;AAAA,EACA,UAAU,WAA0C;AAClD,WAAO;AAAA,EACT;AACF;AAYO,MAAM,iCAAiC;AAMvC,SAAS,iCACd,WACgB;AAChB,QAAM,mBAAmB,UAAU,MAAM,EAAE,QAAQ;AAEnD,SAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM,YAAY,SAA0B,MAA8C;AACxF,UAAI,eAA8B;AAAA,QAChC,MAAM,YAAY,aAAa;AAC7B,gBAAMC,YAAW,MAAM,SAAK,+BAAkB,WAAW,CAAC;AAC1D,qBAAO,kCAAiBA,WAAU,EAAE,aAAa,KAAK,CAAC;AAAA,QACzD;AAAA,MACF;AACA,iBAAW,WAAW,kBAAkB;AACtC,uBAAe,QAAQ,OAAO,cAAc,wBAAwB;AAAA,MACtE;AAEA,YAAM,sBAAkB,+BAAkB,SAAS,EAAE,aAAa,KAAK,CAAC;AACxE,YAAM,WAAW,MAAM,aAAa,YAAY,eAAe;AAC/D,iBAAO,oCAAmB,QAAQ;AAAA,IACpC;AAAA,EACF;AACF;",
|
||||
"names": ["HttpPipelineLogLevel", "response"]
|
||||
}
|
||||
30
backend/node_modules/@azure/core-http-compat/dist/commonjs/response.d.ts
generated
vendored
Normal file
30
backend/node_modules/@azure/core-http-compat/dist/commonjs/response.d.ts
generated
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
import type { FullOperationResponse } from "@azure/core-client";
|
||||
import type { PipelineResponse } from "@azure/core-rest-pipeline";
|
||||
import type { HttpHeadersLike, WebResourceLike } from "./util.js";
|
||||
/**
|
||||
* Http Response that is compatible with the core-v1(core-http).
|
||||
*/
|
||||
export interface CompatResponse extends Omit<FullOperationResponse, "request" | "headers"> {
|
||||
/**
|
||||
* A description of a HTTP request to be made to a remote server.
|
||||
*/
|
||||
request: WebResourceLike;
|
||||
/**
|
||||
* A collection of HTTP header key/value pairs.
|
||||
*/
|
||||
headers: HttpHeadersLike;
|
||||
}
|
||||
/**
|
||||
* A helper to convert response objects from the new pipeline back to the old one.
|
||||
* @param response - A response object from core-client.
|
||||
* @returns A response compatible with `HttpOperationResponse` from core-http.
|
||||
*/
|
||||
export declare function toCompatResponse(response: FullOperationResponse, options?: {
|
||||
createProxy?: boolean;
|
||||
}): CompatResponse;
|
||||
/**
|
||||
* A helper to convert back to a PipelineResponse
|
||||
* @param compatResponse - A response compatible with `HttpOperationResponse` from core-http.
|
||||
*/
|
||||
export declare function toPipelineResponse(compatResponse: CompatResponse): PipelineResponse;
|
||||
//# sourceMappingURL=response.d.ts.map
|
||||
79
backend/node_modules/@azure/core-http-compat/dist/commonjs/response.js
generated
vendored
Normal file
79
backend/node_modules/@azure/core-http-compat/dist/commonjs/response.js
generated
vendored
Normal file
@ -0,0 +1,79 @@
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var response_exports = {};
|
||||
__export(response_exports, {
|
||||
toCompatResponse: () => toCompatResponse,
|
||||
toPipelineResponse: () => toPipelineResponse
|
||||
});
|
||||
module.exports = __toCommonJS(response_exports);
|
||||
var import_core_rest_pipeline = require("@azure/core-rest-pipeline");
|
||||
var import_util = require("./util.js");
|
||||
const originalResponse = /* @__PURE__ */ Symbol("Original FullOperationResponse");
|
||||
function toCompatResponse(response, options) {
|
||||
let request = (0, import_util.toWebResourceLike)(response.request);
|
||||
let headers = (0, import_util.toHttpHeadersLike)(response.headers);
|
||||
if (options?.createProxy) {
|
||||
return new Proxy(response, {
|
||||
get(target, prop, receiver) {
|
||||
if (prop === "headers") {
|
||||
return headers;
|
||||
} else if (prop === "request") {
|
||||
return request;
|
||||
} else if (prop === originalResponse) {
|
||||
return response;
|
||||
}
|
||||
return Reflect.get(target, prop, receiver);
|
||||
},
|
||||
set(target, prop, value, receiver) {
|
||||
if (prop === "headers") {
|
||||
headers = value;
|
||||
} else if (prop === "request") {
|
||||
request = value;
|
||||
}
|
||||
return Reflect.set(target, prop, value, receiver);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
return {
|
||||
...response,
|
||||
request,
|
||||
headers
|
||||
};
|
||||
}
|
||||
}
|
||||
function toPipelineResponse(compatResponse) {
|
||||
const extendedCompatResponse = compatResponse;
|
||||
const response = extendedCompatResponse[originalResponse];
|
||||
const headers = (0, import_core_rest_pipeline.createHttpHeaders)(compatResponse.headers.toJson({ preserveCase: true }));
|
||||
if (response) {
|
||||
response.headers = headers;
|
||||
return response;
|
||||
} else {
|
||||
return {
|
||||
...compatResponse,
|
||||
headers,
|
||||
request: (0, import_util.toPipelineRequest)(compatResponse.request)
|
||||
};
|
||||
}
|
||||
}
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
toCompatResponse,
|
||||
toPipelineResponse
|
||||
});
|
||||
//# sourceMappingURL=response.js.map
|
||||
7
backend/node_modules/@azure/core-http-compat/dist/commonjs/response.js.map
generated
vendored
Normal file
7
backend/node_modules/@azure/core-http-compat/dist/commonjs/response.js.map
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../src/response.ts"],
|
||||
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { FullOperationResponse } from \"@azure/core-client\";\nimport type { PipelineResponse } from \"@azure/core-rest-pipeline\";\nimport { createHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport type { HttpHeadersLike, WebResourceLike } from \"./util.js\";\nimport { toHttpHeadersLike, toPipelineRequest, toWebResourceLike } from \"./util.js\";\n/**\n * Http Response that is compatible with the core-v1(core-http).\n */\nexport interface CompatResponse extends Omit<FullOperationResponse, \"request\" | \"headers\"> {\n /**\n * A description of a HTTP request to be made to a remote server.\n */\n request: WebResourceLike;\n /**\n * A collection of HTTP header key/value pairs.\n */\n headers: HttpHeadersLike;\n}\n\nconst originalResponse = Symbol(\"Original FullOperationResponse\");\ntype ExtendedCompatResponse = CompatResponse & { [originalResponse]?: FullOperationResponse };\n\n/**\n * A helper to convert response objects from the new pipeline back to the old one.\n * @param response - A response object from core-client.\n * @returns A response compatible with `HttpOperationResponse` from core-http.\n */\nexport function toCompatResponse(\n response: FullOperationResponse,\n options?: { createProxy?: boolean },\n): CompatResponse {\n let request = toWebResourceLike(response.request);\n let headers = toHttpHeadersLike(response.headers);\n if (options?.createProxy) {\n return new Proxy(response, {\n get(target, prop, receiver) {\n if (prop === \"headers\") {\n return headers;\n } else if (prop === \"request\") {\n return request;\n } else if (prop === originalResponse) {\n return response;\n }\n return Reflect.get(target, prop, receiver);\n },\n set(target, prop, value, receiver) {\n if (prop === \"headers\") {\n headers = value;\n } else if (prop === \"request\") {\n request = value;\n }\n return Reflect.set(target, prop, value, receiver);\n },\n }) as unknown as CompatResponse;\n } else {\n return {\n ...response,\n request,\n headers,\n };\n }\n}\n\n/**\n * A helper to convert back to a PipelineResponse\n * @param compatResponse - A response compatible with `HttpOperationResponse` from core-http.\n */\nexport function toPipelineResponse(compatResponse: CompatResponse): PipelineResponse {\n const extendedCompatResponse = compatResponse as ExtendedCompatResponse;\n const response = extendedCompatResponse[originalResponse];\n const headers = createHttpHeaders(compatResponse.headers.toJson({ preserveCase: true }));\n if (response) {\n response.headers = headers;\n return response;\n } else {\n return {\n ...compatResponse,\n headers,\n request: toPipelineRequest(compatResponse.request),\n };\n }\n}\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,gCAAkC;AAElC,kBAAwE;AAexE,MAAM,mBAAmB,uBAAO,gCAAgC;AAQzD,SAAS,iBACd,UACA,SACgB;AAChB,MAAI,cAAU,+BAAkB,SAAS,OAAO;AAChD,MAAI,cAAU,+BAAkB,SAAS,OAAO;AAChD,MAAI,SAAS,aAAa;AACxB,WAAO,IAAI,MAAM,UAAU;AAAA,MACzB,IAAI,QAAQ,MAAM,UAAU;AAC1B,YAAI,SAAS,WAAW;AACtB,iBAAO;AAAA,QACT,WAAW,SAAS,WAAW;AAC7B,iBAAO;AAAA,QACT,WAAW,SAAS,kBAAkB;AACpC,iBAAO;AAAA,QACT;AACA,eAAO,QAAQ,IAAI,QAAQ,MAAM,QAAQ;AAAA,MAC3C;AAAA,MACA,IAAI,QAAQ,MAAM,OAAO,UAAU;AACjC,YAAI,SAAS,WAAW;AACtB,oBAAU;AAAA,QACZ,WAAW,SAAS,WAAW;AAC7B,oBAAU;AAAA,QACZ;AACA,eAAO,QAAQ,IAAI,QAAQ,MAAM,OAAO,QAAQ;AAAA,MAClD;AAAA,IACF,CAAC;AAAA,EACH,OAAO;AACL,WAAO;AAAA,MACL,GAAG;AAAA,MACH;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;AAMO,SAAS,mBAAmB,gBAAkD;AACnF,QAAM,yBAAyB;AAC/B,QAAM,WAAW,uBAAuB,gBAAgB;AACxD,QAAM,cAAU,6CAAkB,eAAe,QAAQ,OAAO,EAAE,cAAc,KAAK,CAAC,CAAC;AACvF,MAAI,UAAU;AACZ,aAAS,UAAU;AACnB,WAAO;AAAA,EACT,OAAO;AACL,WAAO;AAAA,MACL,GAAG;AAAA,MACH;AAAA,MACA,aAAS,+BAAkB,eAAe,OAAO;AAAA,IACnD;AAAA,EACF;AACF;",
|
||||
"names": []
|
||||
}
|
||||
11
backend/node_modules/@azure/core-http-compat/dist/commonjs/tsdoc-metadata.json
generated
vendored
Normal file
11
backend/node_modules/@azure/core-http-compat/dist/commonjs/tsdoc-metadata.json
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
||||
// It should be published with your NPM package. It should not be tracked by Git.
|
||||
{
|
||||
"tsdocVersion": "0.12",
|
||||
"toolPackages": [
|
||||
{
|
||||
"packageName": "@microsoft/api-extractor",
|
||||
"packageVersion": "7.58.1"
|
||||
}
|
||||
]
|
||||
}
|
||||
298
backend/node_modules/@azure/core-http-compat/dist/commonjs/util.d.ts
generated
vendored
Normal file
298
backend/node_modules/@azure/core-http-compat/dist/commonjs/util.d.ts
generated
vendored
Normal file
@ -0,0 +1,298 @@
|
||||
import type { HttpMethods, ProxySettings } from "@azure/core-rest-pipeline";
|
||||
import type { AbortSignalLike } from "@azure/abort-controller";
|
||||
import type { HttpHeaders as HttpHeadersV2, PipelineRequest } from "@azure/core-rest-pipeline";
|
||||
export declare function toPipelineRequest(webResource: WebResourceLike, options?: {
|
||||
originalRequest?: PipelineRequest;
|
||||
}): PipelineRequest;
|
||||
export declare function toWebResourceLike(request: PipelineRequest, options?: {
|
||||
createProxy?: boolean;
|
||||
originalRequest?: PipelineRequest;
|
||||
}): WebResourceLike;
|
||||
/**
|
||||
* Converts HttpHeaders from core-rest-pipeline to look like
|
||||
* HttpHeaders from core-http.
|
||||
* @param headers - HttpHeaders from core-rest-pipeline
|
||||
* @returns HttpHeaders as they looked in core-http
|
||||
*/
|
||||
export declare function toHttpHeadersLike(headers: HttpHeadersV2): HttpHeadersLike;
|
||||
/**
|
||||
* An individual header within a HttpHeaders collection.
|
||||
*/
|
||||
export interface HttpHeader {
|
||||
/**
|
||||
* The name of the header.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The value of the header.
|
||||
*/
|
||||
value: string;
|
||||
}
|
||||
/**
|
||||
* A HttpHeaders collection represented as a simple JSON object.
|
||||
*/
|
||||
export type RawHttpHeaders = {
|
||||
[headerName: string]: string;
|
||||
};
|
||||
/**
|
||||
* A collection of HTTP header key/value pairs.
|
||||
*/
|
||||
export interface HttpHeadersLike {
|
||||
/**
|
||||
* Set a header in this collection with the provided name and value. The name is
|
||||
* case-insensitive.
|
||||
* @param headerName - The name of the header to set. This value is case-insensitive.
|
||||
* @param headerValue - The value of the header to set.
|
||||
*/
|
||||
set(headerName: string, headerValue: string | number): void;
|
||||
/**
|
||||
* Get the header value for the provided header name, or undefined if no header exists in this
|
||||
* collection with the provided name.
|
||||
* @param headerName - The name of the header.
|
||||
*/
|
||||
get(headerName: string): string | undefined;
|
||||
/**
|
||||
* Get whether or not this header collection contains a header entry for the provided header name.
|
||||
*/
|
||||
contains(headerName: string): boolean;
|
||||
/**
|
||||
* Remove the header with the provided headerName. Return whether or not the header existed and
|
||||
* was removed.
|
||||
* @param headerName - The name of the header to remove.
|
||||
*/
|
||||
remove(headerName: string): boolean;
|
||||
/**
|
||||
* Get the headers that are contained this collection as an object.
|
||||
*/
|
||||
rawHeaders(): RawHttpHeaders;
|
||||
/**
|
||||
* Get the headers that are contained in this collection as an array.
|
||||
*/
|
||||
headersArray(): HttpHeader[];
|
||||
/**
|
||||
* Get the header names that are contained in this collection.
|
||||
*/
|
||||
headerNames(): string[];
|
||||
/**
|
||||
* Get the header values that are contained in this collection.
|
||||
*/
|
||||
headerValues(): string[];
|
||||
/**
|
||||
* Create a deep clone/copy of this HttpHeaders collection.
|
||||
*/
|
||||
clone(): HttpHeadersLike;
|
||||
/**
|
||||
* Get the JSON object representation of this HTTP header collection.
|
||||
* The result is the same as `rawHeaders()`.
|
||||
*/
|
||||
toJson(options?: {
|
||||
preserveCase?: boolean;
|
||||
}): RawHttpHeaders;
|
||||
}
|
||||
/**
|
||||
* A collection of HTTP header key/value pairs.
|
||||
*/
|
||||
export declare class HttpHeaders implements HttpHeadersLike {
|
||||
private readonly _headersMap;
|
||||
constructor(rawHeaders?: RawHttpHeaders);
|
||||
/**
|
||||
* Set a header in this collection with the provided name and value. The name is
|
||||
* case-insensitive.
|
||||
* @param headerName - The name of the header to set. This value is case-insensitive.
|
||||
* @param headerValue - The value of the header to set.
|
||||
*/
|
||||
set(headerName: string, headerValue: string | number): void;
|
||||
/**
|
||||
* Get the header value for the provided header name, or undefined if no header exists in this
|
||||
* collection with the provided name.
|
||||
* @param headerName - The name of the header.
|
||||
*/
|
||||
get(headerName: string): string | undefined;
|
||||
/**
|
||||
* Get whether or not this header collection contains a header entry for the provided header name.
|
||||
*/
|
||||
contains(headerName: string): boolean;
|
||||
/**
|
||||
* Remove the header with the provided headerName. Return whether or not the header existed and
|
||||
* was removed.
|
||||
* @param headerName - The name of the header to remove.
|
||||
*/
|
||||
remove(headerName: string): boolean;
|
||||
/**
|
||||
* Get the headers that are contained this collection as an object.
|
||||
*/
|
||||
rawHeaders(): RawHttpHeaders;
|
||||
/**
|
||||
* Get the headers that are contained in this collection as an array.
|
||||
*/
|
||||
headersArray(): HttpHeader[];
|
||||
/**
|
||||
* Get the header names that are contained in this collection.
|
||||
*/
|
||||
headerNames(): string[];
|
||||
/**
|
||||
* Get the header values that are contained in this collection.
|
||||
*/
|
||||
headerValues(): string[];
|
||||
/**
|
||||
* Get the JSON object representation of this HTTP header collection.
|
||||
*/
|
||||
toJson(options?: {
|
||||
preserveCase?: boolean;
|
||||
}): RawHttpHeaders;
|
||||
/**
|
||||
* Get the string representation of this HTTP header collection.
|
||||
*/
|
||||
toString(): string;
|
||||
/**
|
||||
* Create a deep clone/copy of this HttpHeaders collection.
|
||||
*/
|
||||
clone(): HttpHeaders;
|
||||
}
|
||||
/**
|
||||
* An interface compatible with NodeJS's `http.Agent`.
|
||||
* We want to avoid publicly re-exporting the actual interface,
|
||||
* since it might vary across runtime versions.
|
||||
*/
|
||||
export interface Agent {
|
||||
/**
|
||||
* Destroy any sockets that are currently in use by the agent.
|
||||
*/
|
||||
destroy(): void;
|
||||
/**
|
||||
* For agents with keepAlive enabled, this sets the maximum number of sockets that will be left open in the free state.
|
||||
*/
|
||||
maxFreeSockets: number;
|
||||
/**
|
||||
* Determines how many concurrent sockets the agent can have open per origin.
|
||||
*/
|
||||
maxSockets: number;
|
||||
/**
|
||||
* An object which contains queues of requests that have not yet been assigned to sockets.
|
||||
*/
|
||||
requests: unknown;
|
||||
/**
|
||||
* An object which contains arrays of sockets currently in use by the agent.
|
||||
*/
|
||||
sockets: unknown;
|
||||
}
|
||||
/**
|
||||
* A description of a HTTP request to be made to a remote server.
|
||||
*/
|
||||
export interface WebResourceLike {
|
||||
/**
|
||||
* The URL being accessed by the request.
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
* The HTTP method to use when making the request.
|
||||
*/
|
||||
method: HttpMethods;
|
||||
/**
|
||||
* The HTTP body contents of the request.
|
||||
*/
|
||||
body?: any;
|
||||
/**
|
||||
* The HTTP headers to use when making the request.
|
||||
*/
|
||||
headers: HttpHeadersLike;
|
||||
/**
|
||||
* Whether or not the body of the HttpOperationResponse should be treated as a stream.
|
||||
* @deprecated Use streamResponseStatusCodes property instead.
|
||||
*/
|
||||
streamResponseBody?: boolean;
|
||||
/**
|
||||
* A list of response status codes whose corresponding HttpOperationResponse body should be treated as a stream.
|
||||
*/
|
||||
streamResponseStatusCodes?: Set<number>;
|
||||
/**
|
||||
* Form data, used to build the request body.
|
||||
*/
|
||||
formData?: any;
|
||||
/**
|
||||
* A query string represented as an object.
|
||||
*/
|
||||
query?: {
|
||||
[key: string]: any;
|
||||
};
|
||||
/**
|
||||
* If credentials (cookies) should be sent along during an XHR.
|
||||
*/
|
||||
withCredentials: boolean;
|
||||
/**
|
||||
* The number of milliseconds a request can take before automatically being terminated.
|
||||
* If the request is terminated, an `AbortError` is thrown.
|
||||
*/
|
||||
timeout: number;
|
||||
/**
|
||||
* Proxy configuration.
|
||||
*/
|
||||
proxySettings?: ProxySettings;
|
||||
/**
|
||||
* If the connection should be reused.
|
||||
*/
|
||||
keepAlive?: boolean;
|
||||
/**
|
||||
* Whether or not to decompress response according to Accept-Encoding header (node-fetch only)
|
||||
*/
|
||||
decompressResponse?: boolean;
|
||||
/**
|
||||
* A unique identifier for the request. Used for logging and tracing.
|
||||
*/
|
||||
requestId: string;
|
||||
/**
|
||||
* Signal of an abort controller. Can be used to abort both sending a network request and waiting for a response.
|
||||
*/
|
||||
abortSignal?: AbortSignalLike;
|
||||
/**
|
||||
* Callback which fires upon upload progress.
|
||||
*/
|
||||
onUploadProgress?: (progress: TransferProgressEvent) => void;
|
||||
/** Callback which fires upon download progress. */
|
||||
onDownloadProgress?: (progress: TransferProgressEvent) => void;
|
||||
/**
|
||||
* NODEJS ONLY
|
||||
*
|
||||
* A Node-only option to provide a custom `http.Agent`/`https.Agent`.
|
||||
* NOTE: usually this should be one instance shared by multiple requests so that the underlying
|
||||
* connection to the service can be reused.
|
||||
* Does nothing when running in the browser.
|
||||
*/
|
||||
agent?: Agent;
|
||||
/**
|
||||
* Additional options to set on the request. This provides a way to override
|
||||
* existing ones or provide request properties that are not declared.
|
||||
*
|
||||
* For possible valid properties, see
|
||||
* - NodeJS https.request options: https://nodejs.org/api/http.html#httprequestoptions-callback
|
||||
* - Browser RequestInit: https://developer.mozilla.org/en-US/docs/Web/API/RequestInit
|
||||
*
|
||||
* WARNING: Options specified here will override any properties of same names when request is sent by {@link HttpClient}.
|
||||
*/
|
||||
requestOverrides?: Record<string, unknown>;
|
||||
/**
|
||||
* Clone this request object.
|
||||
*/
|
||||
clone(): WebResourceLike;
|
||||
/**
|
||||
* Validates that the required properties such as method, url, headers["Content-Type"],
|
||||
* headers["accept-language"] are defined. It will throw an error if one of the above
|
||||
* mentioned properties are not defined.
|
||||
* Note: this a no-op for compat purposes.
|
||||
*/
|
||||
validateRequestProperties(): void;
|
||||
/**
|
||||
* This is a no-op for compat purposes and will throw if called.
|
||||
*/
|
||||
prepare(options: unknown): WebResourceLike;
|
||||
}
|
||||
/**
|
||||
* Fired in response to upload or download progress.
|
||||
*/
|
||||
export type TransferProgressEvent = {
|
||||
/**
|
||||
* The number of bytes loaded so far.
|
||||
*/
|
||||
loadedBytes: number;
|
||||
};
|
||||
//# sourceMappingURL=util.d.ts.map
|
||||
268
backend/node_modules/@azure/core-http-compat/dist/commonjs/util.js
generated
vendored
Normal file
268
backend/node_modules/@azure/core-http-compat/dist/commonjs/util.js
generated
vendored
Normal file
@ -0,0 +1,268 @@
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var util_exports = {};
|
||||
__export(util_exports, {
|
||||
HttpHeaders: () => HttpHeaders,
|
||||
toHttpHeadersLike: () => toHttpHeadersLike,
|
||||
toPipelineRequest: () => toPipelineRequest,
|
||||
toWebResourceLike: () => toWebResourceLike
|
||||
});
|
||||
module.exports = __toCommonJS(util_exports);
|
||||
var import_core_rest_pipeline = require("@azure/core-rest-pipeline");
|
||||
const originalRequestSymbol = /* @__PURE__ */ Symbol("Original PipelineRequest");
|
||||
const originalClientRequestSymbol = /* @__PURE__ */ Symbol.for("@azure/core-client original request");
|
||||
function toPipelineRequest(webResource, options = {}) {
|
||||
const compatWebResource = webResource;
|
||||
const request = compatWebResource[originalRequestSymbol];
|
||||
const headers = (0, import_core_rest_pipeline.createHttpHeaders)(webResource.headers.toJson({ preserveCase: true }));
|
||||
if (request) {
|
||||
request.headers = headers;
|
||||
return request;
|
||||
} else {
|
||||
const newRequest = (0, import_core_rest_pipeline.createPipelineRequest)({
|
||||
url: webResource.url,
|
||||
method: webResource.method,
|
||||
headers,
|
||||
withCredentials: webResource.withCredentials,
|
||||
timeout: webResource.timeout,
|
||||
requestId: webResource.requestId,
|
||||
abortSignal: webResource.abortSignal,
|
||||
body: webResource.body,
|
||||
formData: webResource.formData,
|
||||
disableKeepAlive: !!webResource.keepAlive,
|
||||
onDownloadProgress: webResource.onDownloadProgress,
|
||||
onUploadProgress: webResource.onUploadProgress,
|
||||
proxySettings: webResource.proxySettings,
|
||||
streamResponseStatusCodes: webResource.streamResponseStatusCodes,
|
||||
agent: webResource.agent,
|
||||
requestOverrides: webResource.requestOverrides
|
||||
});
|
||||
if (options.originalRequest) {
|
||||
newRequest[originalClientRequestSymbol] = options.originalRequest;
|
||||
}
|
||||
return newRequest;
|
||||
}
|
||||
}
|
||||
function toWebResourceLike(request, options) {
|
||||
const originalRequest = options?.originalRequest ?? request;
|
||||
const webResource = {
|
||||
url: request.url,
|
||||
method: request.method,
|
||||
headers: toHttpHeadersLike(request.headers),
|
||||
withCredentials: request.withCredentials,
|
||||
timeout: request.timeout,
|
||||
requestId: request.headers.get("x-ms-client-request-id") || request.requestId,
|
||||
abortSignal: request.abortSignal,
|
||||
body: request.body,
|
||||
formData: request.formData,
|
||||
keepAlive: !!request.disableKeepAlive,
|
||||
onDownloadProgress: request.onDownloadProgress,
|
||||
onUploadProgress: request.onUploadProgress,
|
||||
proxySettings: request.proxySettings,
|
||||
streamResponseStatusCodes: request.streamResponseStatusCodes,
|
||||
agent: request.agent,
|
||||
requestOverrides: request.requestOverrides,
|
||||
clone() {
|
||||
throw new Error("Cannot clone a non-proxied WebResourceLike");
|
||||
},
|
||||
prepare() {
|
||||
throw new Error("WebResourceLike.prepare() is not supported by @azure/core-http-compat");
|
||||
},
|
||||
validateRequestProperties() {
|
||||
}
|
||||
};
|
||||
if (options?.createProxy) {
|
||||
return new Proxy(webResource, {
|
||||
get(target, prop, receiver) {
|
||||
if (prop === originalRequestSymbol) {
|
||||
return request;
|
||||
} else if (prop === "clone") {
|
||||
return () => {
|
||||
return toWebResourceLike(toPipelineRequest(webResource, { originalRequest }), {
|
||||
createProxy: true,
|
||||
originalRequest
|
||||
});
|
||||
};
|
||||
}
|
||||
return Reflect.get(target, prop, receiver);
|
||||
},
|
||||
set(target, prop, value, receiver) {
|
||||
if (prop === "keepAlive") {
|
||||
request.disableKeepAlive = !value;
|
||||
}
|
||||
const passThroughProps = [
|
||||
"url",
|
||||
"method",
|
||||
"withCredentials",
|
||||
"timeout",
|
||||
"requestId",
|
||||
"abortSignal",
|
||||
"body",
|
||||
"formData",
|
||||
"onDownloadProgress",
|
||||
"onUploadProgress",
|
||||
"proxySettings",
|
||||
"streamResponseStatusCodes",
|
||||
"agent",
|
||||
"requestOverrides"
|
||||
];
|
||||
if (typeof prop === "string" && passThroughProps.includes(prop)) {
|
||||
request[prop] = value;
|
||||
}
|
||||
return Reflect.set(target, prop, value, receiver);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
return webResource;
|
||||
}
|
||||
}
|
||||
function toHttpHeadersLike(headers) {
|
||||
return new HttpHeaders(headers.toJSON({ preserveCase: true }));
|
||||
}
|
||||
function getHeaderKey(headerName) {
|
||||
return headerName.toLowerCase();
|
||||
}
|
||||
class HttpHeaders {
|
||||
_headersMap;
|
||||
constructor(rawHeaders) {
|
||||
this._headersMap = {};
|
||||
if (rawHeaders) {
|
||||
for (const headerName in rawHeaders) {
|
||||
this.set(headerName, rawHeaders[headerName]);
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Set a header in this collection with the provided name and value. The name is
|
||||
* case-insensitive.
|
||||
* @param headerName - The name of the header to set. This value is case-insensitive.
|
||||
* @param headerValue - The value of the header to set.
|
||||
*/
|
||||
set(headerName, headerValue) {
|
||||
this._headersMap[getHeaderKey(headerName)] = {
|
||||
name: headerName,
|
||||
value: headerValue.toString()
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Get the header value for the provided header name, or undefined if no header exists in this
|
||||
* collection with the provided name.
|
||||
* @param headerName - The name of the header.
|
||||
*/
|
||||
get(headerName) {
|
||||
const header = this._headersMap[getHeaderKey(headerName)];
|
||||
return !header ? void 0 : header.value;
|
||||
}
|
||||
/**
|
||||
* Get whether or not this header collection contains a header entry for the provided header name.
|
||||
*/
|
||||
contains(headerName) {
|
||||
return !!this._headersMap[getHeaderKey(headerName)];
|
||||
}
|
||||
/**
|
||||
* Remove the header with the provided headerName. Return whether or not the header existed and
|
||||
* was removed.
|
||||
* @param headerName - The name of the header to remove.
|
||||
*/
|
||||
remove(headerName) {
|
||||
const result = this.contains(headerName);
|
||||
delete this._headersMap[getHeaderKey(headerName)];
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* Get the headers that are contained this collection as an object.
|
||||
*/
|
||||
rawHeaders() {
|
||||
return this.toJson({ preserveCase: true });
|
||||
}
|
||||
/**
|
||||
* Get the headers that are contained in this collection as an array.
|
||||
*/
|
||||
headersArray() {
|
||||
const headers = [];
|
||||
for (const headerKey in this._headersMap) {
|
||||
headers.push(this._headersMap[headerKey]);
|
||||
}
|
||||
return headers;
|
||||
}
|
||||
/**
|
||||
* Get the header names that are contained in this collection.
|
||||
*/
|
||||
headerNames() {
|
||||
const headerNames = [];
|
||||
const headers = this.headersArray();
|
||||
for (let i = 0; i < headers.length; ++i) {
|
||||
headerNames.push(headers[i].name);
|
||||
}
|
||||
return headerNames;
|
||||
}
|
||||
/**
|
||||
* Get the header values that are contained in this collection.
|
||||
*/
|
||||
headerValues() {
|
||||
const headerValues = [];
|
||||
const headers = this.headersArray();
|
||||
for (let i = 0; i < headers.length; ++i) {
|
||||
headerValues.push(headers[i].value);
|
||||
}
|
||||
return headerValues;
|
||||
}
|
||||
/**
|
||||
* Get the JSON object representation of this HTTP header collection.
|
||||
*/
|
||||
toJson(options = {}) {
|
||||
const result = {};
|
||||
if (options.preserveCase) {
|
||||
for (const headerKey in this._headersMap) {
|
||||
const header = this._headersMap[headerKey];
|
||||
result[header.name] = header.value;
|
||||
}
|
||||
} else {
|
||||
for (const headerKey in this._headersMap) {
|
||||
const header = this._headersMap[headerKey];
|
||||
result[getHeaderKey(header.name)] = header.value;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* Get the string representation of this HTTP header collection.
|
||||
*/
|
||||
toString() {
|
||||
return JSON.stringify(this.toJson({ preserveCase: true }));
|
||||
}
|
||||
/**
|
||||
* Create a deep clone/copy of this HttpHeaders collection.
|
||||
*/
|
||||
clone() {
|
||||
const resultPreservingCasing = {};
|
||||
for (const headerKey in this._headersMap) {
|
||||
const header = this._headersMap[headerKey];
|
||||
resultPreservingCasing[header.name] = header.value;
|
||||
}
|
||||
return new HttpHeaders(resultPreservingCasing);
|
||||
}
|
||||
}
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
HttpHeaders,
|
||||
toHttpHeadersLike,
|
||||
toPipelineRequest,
|
||||
toWebResourceLike
|
||||
});
|
||||
//# sourceMappingURL=util.js.map
|
||||
7
backend/node_modules/@azure/core-http-compat/dist/commonjs/util.js.map
generated
vendored
Normal file
7
backend/node_modules/@azure/core-http-compat/dist/commonjs/util.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
40
backend/node_modules/@azure/core-http-compat/dist/esm/extendedClient.d.ts
generated
vendored
Normal file
40
backend/node_modules/@azure/core-http-compat/dist/esm/extendedClient.d.ts
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
import type { KeepAliveOptions } from "./policies/keepAliveOptions.js";
|
||||
import type { RedirectOptions } from "./policies/redirectOptions.js";
|
||||
import type { CommonClientOptions, OperationArguments, OperationSpec, ServiceClientOptions } from "@azure/core-client";
|
||||
import { ServiceClient } from "@azure/core-client";
|
||||
/**
|
||||
* Options specific to Shim Clients.
|
||||
*/
|
||||
export interface ExtendedClientOptions {
|
||||
/**
|
||||
* Options to disable keep alive.
|
||||
*/
|
||||
keepAliveOptions?: KeepAliveOptions;
|
||||
/**
|
||||
* Options to redirect requests.
|
||||
*/
|
||||
redirectOptions?: RedirectOptions;
|
||||
}
|
||||
/**
|
||||
* Options that shim clients are expected to expose.
|
||||
*/
|
||||
export type ExtendedServiceClientOptions = ServiceClientOptions & ExtendedClientOptions;
|
||||
/**
|
||||
* The common set of options that custom shim clients are expected to expose.
|
||||
*/
|
||||
export type ExtendedCommonClientOptions = CommonClientOptions & ExtendedClientOptions;
|
||||
/**
|
||||
* Client to provide compatability between core V1 & V2.
|
||||
*/
|
||||
export declare class ExtendedServiceClient extends ServiceClient {
|
||||
constructor(options: ExtendedServiceClientOptions);
|
||||
/**
|
||||
* Compatible send operation request function.
|
||||
*
|
||||
* @param operationArguments - Operation arguments
|
||||
* @param operationSpec - Operation Spec
|
||||
* @returns
|
||||
*/
|
||||
sendOperationRequest<T>(operationArguments: OperationArguments, operationSpec: OperationSpec): Promise<T>;
|
||||
}
|
||||
//# sourceMappingURL=extendedClient.d.ts.map
|
||||
52
backend/node_modules/@azure/core-http-compat/dist/esm/extendedClient.js
generated
vendored
Normal file
52
backend/node_modules/@azure/core-http-compat/dist/esm/extendedClient.js
generated
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { createDisableKeepAlivePolicy, pipelineContainsDisableKeepAlivePolicy, } from "./policies/disableKeepAlivePolicy.js";
|
||||
import { redirectPolicyName } from "@azure/core-rest-pipeline";
|
||||
import { ServiceClient } from "@azure/core-client";
|
||||
import { toCompatResponse } from "./response.js";
|
||||
/**
|
||||
* Client to provide compatability between core V1 & V2.
|
||||
*/
|
||||
export class ExtendedServiceClient extends ServiceClient {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
if (options.keepAliveOptions?.enable === false &&
|
||||
!pipelineContainsDisableKeepAlivePolicy(this.pipeline)) {
|
||||
this.pipeline.addPolicy(createDisableKeepAlivePolicy());
|
||||
}
|
||||
if (options.redirectOptions?.handleRedirects === false) {
|
||||
this.pipeline.removePolicy({
|
||||
name: redirectPolicyName,
|
||||
});
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Compatible send operation request function.
|
||||
*
|
||||
* @param operationArguments - Operation arguments
|
||||
* @param operationSpec - Operation Spec
|
||||
* @returns
|
||||
*/
|
||||
async sendOperationRequest(operationArguments, operationSpec) {
|
||||
const userProvidedCallBack = operationArguments?.options?.onResponse;
|
||||
let lastResponse;
|
||||
function onResponse(rawResponse, flatResponse, error) {
|
||||
lastResponse = rawResponse;
|
||||
if (userProvidedCallBack) {
|
||||
userProvidedCallBack(rawResponse, flatResponse, error);
|
||||
}
|
||||
}
|
||||
operationArguments.options = {
|
||||
...operationArguments.options,
|
||||
onResponse,
|
||||
};
|
||||
const result = await super.sendOperationRequest(operationArguments, operationSpec);
|
||||
if (lastResponse) {
|
||||
Object.defineProperty(result, "_response", {
|
||||
value: toCompatResponse(lastResponse),
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=extendedClient.js.map
|
||||
1
backend/node_modules/@azure/core-http-compat/dist/esm/extendedClient.js.map
generated
vendored
Normal file
1
backend/node_modules/@azure/core-http-compat/dist/esm/extendedClient.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"extendedClient.js","sourceRoot":"","sources":["../../src/extendedClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EACL,4BAA4B,EAC5B,sCAAsC,GACvC,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAS/D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AA0BjD;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,aAAa;IACtD,YAAY,OAAqC;QAC/C,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IACE,OAAO,CAAC,gBAAgB,EAAE,MAAM,KAAK,KAAK;YAC1C,CAAC,sCAAsC,CAAC,IAAI,CAAC,QAAQ,CAAC,EACtD,CAAC;YACD,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,4BAA4B,EAAE,CAAC,CAAC;QAC1D,CAAC;QAED,IAAI,OAAO,CAAC,eAAe,EAAE,eAAe,KAAK,KAAK,EAAE,CAAC;YACvD,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC;gBACzB,IAAI,EAAE,kBAAkB;aACzB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,oBAAoB,CACxB,kBAAsC,EACtC,aAA4B;QAE5B,MAAM,oBAAoB,GACxB,kBAAkB,EAAE,OAAO,EAAE,UAAU,CAAC;QAE1C,IAAI,YAA+C,CAAC;QAEpD,SAAS,UAAU,CACjB,WAAkC,EAClC,YAAqB,EACrB,KAAe;YAEf,YAAY,GAAG,WAAW,CAAC;YAC3B,IAAI,oBAAoB,EAAE,CAAC;gBACzB,oBAAoB,CAAC,WAAW,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;YACzD,CAAC;QACH,CAAC;QAED,kBAAkB,CAAC,OAAO,GAAG;YAC3B,GAAG,kBAAkB,CAAC,OAAO;YAC7B,UAAU;SACX,CAAC;QAEF,MAAM,MAAM,GAAM,MAAM,KAAK,CAAC,oBAAoB,CAAC,kBAAkB,EAAE,aAAa,CAAC,CAAC;QAEtF,IAAI,YAAY,EAAE,CAAC;YACjB,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE;gBACzC,KAAK,EAAE,gBAAgB,CAAC,YAAY,CAAC;aACtC,CAAC,CAAC;QACL,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { KeepAliveOptions } from \"./policies/keepAliveOptions.js\";\nimport {\n createDisableKeepAlivePolicy,\n pipelineContainsDisableKeepAlivePolicy,\n} from \"./policies/disableKeepAlivePolicy.js\";\nimport type { RedirectOptions } from \"./policies/redirectOptions.js\";\nimport { redirectPolicyName } from \"@azure/core-rest-pipeline\";\nimport type {\n CommonClientOptions,\n FullOperationResponse,\n OperationArguments,\n OperationSpec,\n RawResponseCallback,\n ServiceClientOptions,\n} from \"@azure/core-client\";\nimport { ServiceClient } from \"@azure/core-client\";\nimport { toCompatResponse } from \"./response.js\";\n\n/**\n * Options specific to Shim Clients.\n */\nexport interface ExtendedClientOptions {\n /**\n * Options to disable keep alive.\n */\n keepAliveOptions?: KeepAliveOptions;\n /**\n * Options to redirect requests.\n */\n redirectOptions?: RedirectOptions;\n}\n\n/**\n * Options that shim clients are expected to expose.\n */\nexport type ExtendedServiceClientOptions = ServiceClientOptions & ExtendedClientOptions;\n\n/**\n * The common set of options that custom shim clients are expected to expose.\n */\nexport type ExtendedCommonClientOptions = CommonClientOptions & ExtendedClientOptions;\n\n/**\n * Client to provide compatability between core V1 & V2.\n */\nexport class ExtendedServiceClient extends ServiceClient {\n constructor(options: ExtendedServiceClientOptions) {\n super(options);\n\n if (\n options.keepAliveOptions?.enable === false &&\n !pipelineContainsDisableKeepAlivePolicy(this.pipeline)\n ) {\n this.pipeline.addPolicy(createDisableKeepAlivePolicy());\n }\n\n if (options.redirectOptions?.handleRedirects === false) {\n this.pipeline.removePolicy({\n name: redirectPolicyName,\n });\n }\n }\n\n /**\n * Compatible send operation request function.\n *\n * @param operationArguments - Operation arguments\n * @param operationSpec - Operation Spec\n * @returns\n */\n async sendOperationRequest<T>(\n operationArguments: OperationArguments,\n operationSpec: OperationSpec,\n ): Promise<T> {\n const userProvidedCallBack: RawResponseCallback | undefined =\n operationArguments?.options?.onResponse;\n\n let lastResponse: FullOperationResponse | undefined;\n\n function onResponse(\n rawResponse: FullOperationResponse,\n flatResponse: unknown,\n error?: unknown,\n ): void {\n lastResponse = rawResponse;\n if (userProvidedCallBack) {\n userProvidedCallBack(rawResponse, flatResponse, error);\n }\n }\n\n operationArguments.options = {\n ...operationArguments.options,\n onResponse,\n };\n\n const result: T = await super.sendOperationRequest(operationArguments, operationSpec);\n\n if (lastResponse) {\n Object.defineProperty(result, \"_response\", {\n value: toCompatResponse(lastResponse),\n });\n }\n\n return result;\n }\n}\n"]}
|
||||
9
backend/node_modules/@azure/core-http-compat/dist/esm/httpClientAdapter.d.ts
generated
vendored
Normal file
9
backend/node_modules/@azure/core-http-compat/dist/esm/httpClientAdapter.d.ts
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
import type { HttpClient } from "@azure/core-rest-pipeline";
|
||||
import type { RequestPolicy } from "./policies/requestPolicyFactoryPolicy.js";
|
||||
/**
|
||||
* Converts a RequestPolicy based HttpClient to a PipelineRequest based HttpClient.
|
||||
* @param requestPolicyClient - A HttpClient compatible with core-http
|
||||
* @returns A HttpClient compatible with core-rest-pipeline
|
||||
*/
|
||||
export declare function convertHttpClient(requestPolicyClient: RequestPolicy): HttpClient;
|
||||
//# sourceMappingURL=httpClientAdapter.d.ts.map
|
||||
18
backend/node_modules/@azure/core-http-compat/dist/esm/httpClientAdapter.js
generated
vendored
Normal file
18
backend/node_modules/@azure/core-http-compat/dist/esm/httpClientAdapter.js
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { toPipelineResponse } from "./response.js";
|
||||
import { toWebResourceLike } from "./util.js";
|
||||
/**
|
||||
* Converts a RequestPolicy based HttpClient to a PipelineRequest based HttpClient.
|
||||
* @param requestPolicyClient - A HttpClient compatible with core-http
|
||||
* @returns A HttpClient compatible with core-rest-pipeline
|
||||
*/
|
||||
export function convertHttpClient(requestPolicyClient) {
|
||||
return {
|
||||
sendRequest: async (request) => {
|
||||
const response = await requestPolicyClient.sendRequest(toWebResourceLike(request, { createProxy: true }));
|
||||
return toPipelineResponse(response);
|
||||
},
|
||||
};
|
||||
}
|
||||
//# sourceMappingURL=httpClientAdapter.js.map
|
||||
1
backend/node_modules/@azure/core-http-compat/dist/esm/httpClientAdapter.js.map
generated
vendored
Normal file
1
backend/node_modules/@azure/core-http-compat/dist/esm/httpClientAdapter.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"httpClientAdapter.js","sourceRoot":"","sources":["../../src/httpClientAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,mBAAkC;IAClE,OAAO;QACL,WAAW,EAAE,KAAK,EAAE,OAAwB,EAA6B,EAAE;YACzE,MAAM,QAAQ,GAAG,MAAM,mBAAmB,CAAC,WAAW,CACpD,iBAAiB,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAClD,CAAC;YACF,OAAO,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QACtC,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { HttpClient, PipelineRequest, PipelineResponse } from \"@azure/core-rest-pipeline\";\nimport type { RequestPolicy } from \"./policies/requestPolicyFactoryPolicy.js\";\nimport { toPipelineResponse } from \"./response.js\";\nimport { toWebResourceLike } from \"./util.js\";\n\n/**\n * Converts a RequestPolicy based HttpClient to a PipelineRequest based HttpClient.\n * @param requestPolicyClient - A HttpClient compatible with core-http\n * @returns A HttpClient compatible with core-rest-pipeline\n */\nexport function convertHttpClient(requestPolicyClient: RequestPolicy): HttpClient {\n return {\n sendRequest: async (request: PipelineRequest): Promise<PipelineResponse> => {\n const response = await requestPolicyClient.sendRequest(\n toWebResourceLike(request, { createProxy: true }),\n );\n return toPipelineResponse(response);\n },\n };\n}\n"]}
|
||||
15
backend/node_modules/@azure/core-http-compat/dist/esm/index.d.ts
generated
vendored
Normal file
15
backend/node_modules/@azure/core-http-compat/dist/esm/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* A Shim Library that provides compatibility between Core V1 & V2 Packages.
|
||||
*
|
||||
* @packageDocumentation
|
||||
*/
|
||||
export { ExtendedServiceClient, type ExtendedServiceClientOptions, type ExtendedCommonClientOptions, type ExtendedClientOptions, } from "./extendedClient.js";
|
||||
export { toCompatResponse } from "./response.js";
|
||||
export type { CompatResponse } from "./response.js";
|
||||
export { requestPolicyFactoryPolicyName, createRequestPolicyFactoryPolicy, type RequestPolicyFactory, type RequestPolicy, type RequestPolicyOptionsLike, HttpPipelineLogLevel, } from "./policies/requestPolicyFactoryPolicy.js";
|
||||
export type { KeepAliveOptions } from "./policies/keepAliveOptions.js";
|
||||
export type { RedirectOptions } from "./policies/redirectOptions.js";
|
||||
export { disableKeepAlivePolicyName } from "./policies/disableKeepAlivePolicy.js";
|
||||
export { convertHttpClient } from "./httpClientAdapter.js";
|
||||
export { type Agent, type WebResourceLike, type HttpHeadersLike, type RawHttpHeaders, type HttpHeader, type TransferProgressEvent, toHttpHeadersLike, } from "./util.js";
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
14
backend/node_modules/@azure/core-http-compat/dist/esm/index.js
generated
vendored
Normal file
14
backend/node_modules/@azure/core-http-compat/dist/esm/index.js
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
/**
|
||||
* A Shim Library that provides compatibility between Core V1 & V2 Packages.
|
||||
*
|
||||
* @packageDocumentation
|
||||
*/
|
||||
export { ExtendedServiceClient, } from "./extendedClient.js";
|
||||
export { toCompatResponse } from "./response.js";
|
||||
export { requestPolicyFactoryPolicyName, createRequestPolicyFactoryPolicy, HttpPipelineLogLevel, } from "./policies/requestPolicyFactoryPolicy.js";
|
||||
export { disableKeepAlivePolicyName } from "./policies/disableKeepAlivePolicy.js";
|
||||
export { convertHttpClient } from "./httpClientAdapter.js";
|
||||
export { toHttpHeadersLike, } from "./util.js";
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
backend/node_modules/@azure/core-http-compat/dist/esm/index.js.map
generated
vendored
Normal file
1
backend/node_modules/@azure/core-http-compat/dist/esm/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;GAIG;AACH,OAAO,EACL,qBAAqB,GAItB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EACL,8BAA8B,EAC9B,gCAAgC,EAIhC,oBAAoB,GACrB,MAAM,0CAA0C,CAAC;AAGlD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAOL,iBAAiB,GAClB,MAAM,WAAW,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * A Shim Library that provides compatibility between Core V1 & V2 Packages.\n *\n * @packageDocumentation\n */\nexport {\n ExtendedServiceClient,\n type ExtendedServiceClientOptions,\n type ExtendedCommonClientOptions,\n type ExtendedClientOptions,\n} from \"./extendedClient.js\";\nexport { toCompatResponse } from \"./response.js\";\nexport type { CompatResponse } from \"./response.js\";\nexport {\n requestPolicyFactoryPolicyName,\n createRequestPolicyFactoryPolicy,\n type RequestPolicyFactory,\n type RequestPolicy,\n type RequestPolicyOptionsLike,\n HttpPipelineLogLevel,\n} from \"./policies/requestPolicyFactoryPolicy.js\";\nexport type { KeepAliveOptions } from \"./policies/keepAliveOptions.js\";\nexport type { RedirectOptions } from \"./policies/redirectOptions.js\";\nexport { disableKeepAlivePolicyName } from \"./policies/disableKeepAlivePolicy.js\";\nexport { convertHttpClient } from \"./httpClientAdapter.js\";\nexport {\n type Agent,\n type WebResourceLike,\n type HttpHeadersLike,\n type RawHttpHeaders,\n type HttpHeader,\n type TransferProgressEvent,\n toHttpHeadersLike,\n} from \"./util.js\";\n"]}
|
||||
3
backend/node_modules/@azure/core-http-compat/dist/esm/package.json
generated
vendored
Normal file
3
backend/node_modules/@azure/core-http-compat/dist/esm/package.json
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
8
backend/node_modules/@azure/core-http-compat/dist/esm/policies/disableKeepAlivePolicy.d.ts
generated
vendored
Normal file
8
backend/node_modules/@azure/core-http-compat/dist/esm/policies/disableKeepAlivePolicy.d.ts
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import type { Pipeline, PipelinePolicy } from "@azure/core-rest-pipeline";
|
||||
export declare const disableKeepAlivePolicyName = "DisableKeepAlivePolicy";
|
||||
export declare function createDisableKeepAlivePolicy(): PipelinePolicy;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare function pipelineContainsDisableKeepAlivePolicy(pipeline: Pipeline): boolean;
|
||||
//# sourceMappingURL=disableKeepAlivePolicy.d.ts.map
|
||||
19
backend/node_modules/@azure/core-http-compat/dist/esm/policies/disableKeepAlivePolicy.js
generated
vendored
Normal file
19
backend/node_modules/@azure/core-http-compat/dist/esm/policies/disableKeepAlivePolicy.js
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
export const disableKeepAlivePolicyName = "DisableKeepAlivePolicy";
|
||||
export function createDisableKeepAlivePolicy() {
|
||||
return {
|
||||
name: disableKeepAlivePolicyName,
|
||||
async sendRequest(request, next) {
|
||||
request.disableKeepAlive = true;
|
||||
return next(request);
|
||||
},
|
||||
};
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export function pipelineContainsDisableKeepAlivePolicy(pipeline) {
|
||||
return pipeline.getOrderedPolicies().some((policy) => policy.name === disableKeepAlivePolicyName);
|
||||
}
|
||||
//# sourceMappingURL=disableKeepAlivePolicy.js.map
|
||||
1
backend/node_modules/@azure/core-http-compat/dist/esm/policies/disableKeepAlivePolicy.js.map
generated
vendored
Normal file
1
backend/node_modules/@azure/core-http-compat/dist/esm/policies/disableKeepAlivePolicy.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"disableKeepAlivePolicy.js","sourceRoot":"","sources":["../../../src/policies/disableKeepAlivePolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAUlC,MAAM,CAAC,MAAM,0BAA0B,GAAG,wBAAwB,CAAC;AAEnE,MAAM,UAAU,4BAA4B;IAC1C,OAAO;QACL,IAAI,EAAE,0BAA0B;QAChC,KAAK,CAAC,WAAW,CAAC,OAAwB,EAAE,IAAiB;YAC3D,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;YAChC,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sCAAsC,CAAC,QAAkB;IACvE,OAAO,QAAQ,CAAC,kBAAkB,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,0BAA0B,CAAC,CAAC;AACpG,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n Pipeline,\n PipelinePolicy,\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\n\nexport const disableKeepAlivePolicyName = \"DisableKeepAlivePolicy\";\n\nexport function createDisableKeepAlivePolicy(): PipelinePolicy {\n return {\n name: disableKeepAlivePolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise<PipelineResponse> {\n request.disableKeepAlive = true;\n return next(request);\n },\n };\n}\n\n/**\n * @internal\n */\nexport function pipelineContainsDisableKeepAlivePolicy(pipeline: Pipeline): boolean {\n return pipeline.getOrderedPolicies().some((policy) => policy.name === disableKeepAlivePolicyName);\n}\n"]}
|
||||
11
backend/node_modules/@azure/core-http-compat/dist/esm/policies/keepAliveOptions.d.ts
generated
vendored
Normal file
11
backend/node_modules/@azure/core-http-compat/dist/esm/policies/keepAliveOptions.d.ts
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Keep Alive Options for how HTTP connections.
|
||||
*/
|
||||
export interface KeepAliveOptions {
|
||||
/**
|
||||
* When true, connections will be kept alive for multiple requests.
|
||||
* Defaults to true.
|
||||
*/
|
||||
enable?: boolean;
|
||||
}
|
||||
//# sourceMappingURL=keepAliveOptions.d.ts.map
|
||||
4
backend/node_modules/@azure/core-http-compat/dist/esm/policies/keepAliveOptions.js
generated
vendored
Normal file
4
backend/node_modules/@azure/core-http-compat/dist/esm/policies/keepAliveOptions.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
export {};
|
||||
//# sourceMappingURL=keepAliveOptions.js.map
|
||||
1
backend/node_modules/@azure/core-http-compat/dist/esm/policies/keepAliveOptions.js.map
generated
vendored
Normal file
1
backend/node_modules/@azure/core-http-compat/dist/esm/policies/keepAliveOptions.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"keepAliveOptions.js","sourceRoot":"","sources":["../../../src/policies/keepAliveOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Keep Alive Options for how HTTP connections.\n */\nexport interface KeepAliveOptions {\n /**\n * When true, connections will be kept alive for multiple requests.\n * Defaults to true.\n */\n enable?: boolean;\n}\n"]}
|
||||
15
backend/node_modules/@azure/core-http-compat/dist/esm/policies/redirectOptions.d.ts
generated
vendored
Normal file
15
backend/node_modules/@azure/core-http-compat/dist/esm/policies/redirectOptions.d.ts
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Options for how redirect responses are handled.
|
||||
*/
|
||||
export interface RedirectOptions {
|
||||
/**
|
||||
* When true, redirect responses are followed. Defaults to true.
|
||||
*/
|
||||
handleRedirects?: boolean;
|
||||
/**
|
||||
* The maximum number of times the redirect URL will be tried before
|
||||
* failing. Defaults to 20.
|
||||
*/
|
||||
maxRetries?: number;
|
||||
}
|
||||
//# sourceMappingURL=redirectOptions.d.ts.map
|
||||
4
backend/node_modules/@azure/core-http-compat/dist/esm/policies/redirectOptions.js
generated
vendored
Normal file
4
backend/node_modules/@azure/core-http-compat/dist/esm/policies/redirectOptions.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
export {};
|
||||
//# sourceMappingURL=redirectOptions.js.map
|
||||
1
backend/node_modules/@azure/core-http-compat/dist/esm/policies/redirectOptions.js.map
generated
vendored
Normal file
1
backend/node_modules/@azure/core-http-compat/dist/esm/policies/redirectOptions.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"redirectOptions.js","sourceRoot":"","sources":["../../../src/policies/redirectOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Options for how redirect responses are handled.\n */\nexport interface RedirectOptions {\n /**\n * When true, redirect responses are followed. Defaults to true.\n */\n handleRedirects?: boolean;\n\n /**\n * The maximum number of times the redirect URL will be tried before\n * failing. Defaults to 20.\n */\n maxRetries?: number;\n}\n"]}
|
||||
41
backend/node_modules/@azure/core-http-compat/dist/esm/policies/requestPolicyFactoryPolicy.d.ts
generated
vendored
Normal file
41
backend/node_modules/@azure/core-http-compat/dist/esm/policies/requestPolicyFactoryPolicy.d.ts
generated
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
import type { PipelinePolicy } from "@azure/core-rest-pipeline";
|
||||
import type { WebResourceLike } from "../util.js";
|
||||
import type { CompatResponse } from "../response.js";
|
||||
/**
|
||||
* A compatible interface for core-http request policies
|
||||
*/
|
||||
export interface RequestPolicy {
|
||||
sendRequest(httpRequest: WebResourceLike): Promise<CompatResponse>;
|
||||
}
|
||||
/**
|
||||
* An enum for compatibility with RequestPolicy
|
||||
*/
|
||||
export declare enum HttpPipelineLogLevel {
|
||||
ERROR = 1,
|
||||
INFO = 3,
|
||||
OFF = 0,
|
||||
WARNING = 2
|
||||
}
|
||||
/**
|
||||
* An interface for compatibility with RequestPolicy
|
||||
*/
|
||||
export interface RequestPolicyOptionsLike {
|
||||
log(logLevel: HttpPipelineLogLevel, message: string): void;
|
||||
shouldLog(logLevel: HttpPipelineLogLevel): boolean;
|
||||
}
|
||||
/**
|
||||
* An interface for compatibility with core-http's RequestPolicyFactory
|
||||
*/
|
||||
export interface RequestPolicyFactory {
|
||||
create(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike): RequestPolicy;
|
||||
}
|
||||
/**
|
||||
* The name of the RequestPolicyFactoryPolicy
|
||||
*/
|
||||
export declare const requestPolicyFactoryPolicyName = "RequestPolicyFactoryPolicy";
|
||||
/**
|
||||
* A policy that wraps policies written for core-http.
|
||||
* @param factories - An array of `RequestPolicyFactory` objects from a core-http pipeline
|
||||
*/
|
||||
export declare function createRequestPolicyFactoryPolicy(factories: RequestPolicyFactory[]): PipelinePolicy;
|
||||
//# sourceMappingURL=requestPolicyFactoryPolicy.d.ts.map
|
||||
51
backend/node_modules/@azure/core-http-compat/dist/esm/policies/requestPolicyFactoryPolicy.js
generated
vendored
Normal file
51
backend/node_modules/@azure/core-http-compat/dist/esm/policies/requestPolicyFactoryPolicy.js
generated
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { toPipelineRequest, toWebResourceLike } from "../util.js";
|
||||
import { toCompatResponse, toPipelineResponse } from "../response.js";
|
||||
/**
|
||||
* An enum for compatibility with RequestPolicy
|
||||
*/
|
||||
export var HttpPipelineLogLevel;
|
||||
(function (HttpPipelineLogLevel) {
|
||||
HttpPipelineLogLevel[HttpPipelineLogLevel["ERROR"] = 1] = "ERROR";
|
||||
HttpPipelineLogLevel[HttpPipelineLogLevel["INFO"] = 3] = "INFO";
|
||||
HttpPipelineLogLevel[HttpPipelineLogLevel["OFF"] = 0] = "OFF";
|
||||
HttpPipelineLogLevel[HttpPipelineLogLevel["WARNING"] = 2] = "WARNING";
|
||||
})(HttpPipelineLogLevel || (HttpPipelineLogLevel = {}));
|
||||
const mockRequestPolicyOptions = {
|
||||
log(_logLevel, _message) {
|
||||
/* do nothing */
|
||||
},
|
||||
shouldLog(_logLevel) {
|
||||
return false;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* The name of the RequestPolicyFactoryPolicy
|
||||
*/
|
||||
export const requestPolicyFactoryPolicyName = "RequestPolicyFactoryPolicy";
|
||||
/**
|
||||
* A policy that wraps policies written for core-http.
|
||||
* @param factories - An array of `RequestPolicyFactory` objects from a core-http pipeline
|
||||
*/
|
||||
export function createRequestPolicyFactoryPolicy(factories) {
|
||||
const orderedFactories = factories.slice().reverse();
|
||||
return {
|
||||
name: requestPolicyFactoryPolicyName,
|
||||
async sendRequest(request, next) {
|
||||
let httpPipeline = {
|
||||
async sendRequest(httpRequest) {
|
||||
const response = await next(toPipelineRequest(httpRequest));
|
||||
return toCompatResponse(response, { createProxy: true });
|
||||
},
|
||||
};
|
||||
for (const factory of orderedFactories) {
|
||||
httpPipeline = factory.create(httpPipeline, mockRequestPolicyOptions);
|
||||
}
|
||||
const webResourceLike = toWebResourceLike(request, { createProxy: true });
|
||||
const response = await httpPipeline.sendRequest(webResourceLike);
|
||||
return toPipelineResponse(response);
|
||||
},
|
||||
};
|
||||
}
|
||||
//# sourceMappingURL=requestPolicyFactoryPolicy.js.map
|
||||
1
backend/node_modules/@azure/core-http-compat/dist/esm/policies/requestPolicyFactoryPolicy.js.map
generated
vendored
Normal file
1
backend/node_modules/@azure/core-http-compat/dist/esm/policies/requestPolicyFactoryPolicy.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"requestPolicyFactoryPolicy.js","sourceRoot":"","sources":["../../../src/policies/requestPolicyFactoryPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AASlC,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAElE,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAStE;;GAEG;AACH,MAAM,CAAN,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,iEAAS,CAAA;IACT,+DAAQ,CAAA;IACR,6DAAO,CAAA;IACP,qEAAW,CAAA;AACb,CAAC,EALW,oBAAoB,KAApB,oBAAoB,QAK/B;AAUD,MAAM,wBAAwB,GAA6B;IACzD,GAAG,CAAC,SAA+B,EAAE,QAAgB;QACnD,gBAAgB;IAClB,CAAC;IACD,SAAS,CAAC,SAA+B;QACvC,OAAO,KAAK,CAAC;IACf,CAAC;CACF,CAAC;AASF;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,4BAA4B,CAAC;AAE3E;;;GAGG;AACH,MAAM,UAAU,gCAAgC,CAC9C,SAAiC;IAEjC,MAAM,gBAAgB,GAAG,SAAS,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,CAAC;IAErD,OAAO;QACL,IAAI,EAAE,8BAA8B;QACpC,KAAK,CAAC,WAAW,CAAC,OAAwB,EAAE,IAAiB;YAC3D,IAAI,YAAY,GAAkB;gBAChC,KAAK,CAAC,WAAW,CAAC,WAAW;oBAC3B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC,CAAC;oBAC5D,OAAO,gBAAgB,CAAC,QAAQ,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;gBAC3D,CAAC;aACF,CAAC;YACF,KAAK,MAAM,OAAO,IAAI,gBAAgB,EAAE,CAAC;gBACvC,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,wBAAwB,CAAC,CAAC;YACxE,CAAC;YAED,MAAM,eAAe,GAAG,iBAAiB,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;YAC1E,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;YACjE,OAAO,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QACtC,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n PipelinePolicy,\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport type { WebResourceLike } from \"../util.js\";\nimport { toPipelineRequest, toWebResourceLike } from \"../util.js\";\nimport type { CompatResponse } from \"../response.js\";\nimport { toCompatResponse, toPipelineResponse } from \"../response.js\";\n\n/**\n * A compatible interface for core-http request policies\n */\nexport interface RequestPolicy {\n sendRequest(httpRequest: WebResourceLike): Promise<CompatResponse>;\n}\n\n/**\n * An enum for compatibility with RequestPolicy\n */\nexport enum HttpPipelineLogLevel {\n ERROR = 1,\n INFO = 3,\n OFF = 0,\n WARNING = 2,\n}\n\n/**\n * An interface for compatibility with RequestPolicy\n */\nexport interface RequestPolicyOptionsLike {\n log(logLevel: HttpPipelineLogLevel, message: string): void;\n shouldLog(logLevel: HttpPipelineLogLevel): boolean;\n}\n\nconst mockRequestPolicyOptions: RequestPolicyOptionsLike = {\n log(_logLevel: HttpPipelineLogLevel, _message: string): void {\n /* do nothing */\n },\n shouldLog(_logLevel: HttpPipelineLogLevel): boolean {\n return false;\n },\n};\n\n/**\n * An interface for compatibility with core-http's RequestPolicyFactory\n */\nexport interface RequestPolicyFactory {\n create(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike): RequestPolicy;\n}\n\n/**\n * The name of the RequestPolicyFactoryPolicy\n */\nexport const requestPolicyFactoryPolicyName = \"RequestPolicyFactoryPolicy\";\n\n/**\n * A policy that wraps policies written for core-http.\n * @param factories - An array of `RequestPolicyFactory` objects from a core-http pipeline\n */\nexport function createRequestPolicyFactoryPolicy(\n factories: RequestPolicyFactory[],\n): PipelinePolicy {\n const orderedFactories = factories.slice().reverse();\n\n return {\n name: requestPolicyFactoryPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise<PipelineResponse> {\n let httpPipeline: RequestPolicy = {\n async sendRequest(httpRequest) {\n const response = await next(toPipelineRequest(httpRequest));\n return toCompatResponse(response, { createProxy: true });\n },\n };\n for (const factory of orderedFactories) {\n httpPipeline = factory.create(httpPipeline, mockRequestPolicyOptions);\n }\n\n const webResourceLike = toWebResourceLike(request, { createProxy: true });\n const response = await httpPipeline.sendRequest(webResourceLike);\n return toPipelineResponse(response);\n },\n };\n}\n"]}
|
||||
30
backend/node_modules/@azure/core-http-compat/dist/esm/response.d.ts
generated
vendored
Normal file
30
backend/node_modules/@azure/core-http-compat/dist/esm/response.d.ts
generated
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
import type { FullOperationResponse } from "@azure/core-client";
|
||||
import type { PipelineResponse } from "@azure/core-rest-pipeline";
|
||||
import type { HttpHeadersLike, WebResourceLike } from "./util.js";
|
||||
/**
|
||||
* Http Response that is compatible with the core-v1(core-http).
|
||||
*/
|
||||
export interface CompatResponse extends Omit<FullOperationResponse, "request" | "headers"> {
|
||||
/**
|
||||
* A description of a HTTP request to be made to a remote server.
|
||||
*/
|
||||
request: WebResourceLike;
|
||||
/**
|
||||
* A collection of HTTP header key/value pairs.
|
||||
*/
|
||||
headers: HttpHeadersLike;
|
||||
}
|
||||
/**
|
||||
* A helper to convert response objects from the new pipeline back to the old one.
|
||||
* @param response - A response object from core-client.
|
||||
* @returns A response compatible with `HttpOperationResponse` from core-http.
|
||||
*/
|
||||
export declare function toCompatResponse(response: FullOperationResponse, options?: {
|
||||
createProxy?: boolean;
|
||||
}): CompatResponse;
|
||||
/**
|
||||
* A helper to convert back to a PipelineResponse
|
||||
* @param compatResponse - A response compatible with `HttpOperationResponse` from core-http.
|
||||
*/
|
||||
export declare function toPipelineResponse(compatResponse: CompatResponse): PipelineResponse;
|
||||
//# sourceMappingURL=response.d.ts.map
|
||||
67
backend/node_modules/@azure/core-http-compat/dist/esm/response.js
generated
vendored
Normal file
67
backend/node_modules/@azure/core-http-compat/dist/esm/response.js
generated
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { createHttpHeaders } from "@azure/core-rest-pipeline";
|
||||
import { toHttpHeadersLike, toPipelineRequest, toWebResourceLike } from "./util.js";
|
||||
const originalResponse = Symbol("Original FullOperationResponse");
|
||||
/**
|
||||
* A helper to convert response objects from the new pipeline back to the old one.
|
||||
* @param response - A response object from core-client.
|
||||
* @returns A response compatible with `HttpOperationResponse` from core-http.
|
||||
*/
|
||||
export function toCompatResponse(response, options) {
|
||||
let request = toWebResourceLike(response.request);
|
||||
let headers = toHttpHeadersLike(response.headers);
|
||||
if (options?.createProxy) {
|
||||
return new Proxy(response, {
|
||||
get(target, prop, receiver) {
|
||||
if (prop === "headers") {
|
||||
return headers;
|
||||
}
|
||||
else if (prop === "request") {
|
||||
return request;
|
||||
}
|
||||
else if (prop === originalResponse) {
|
||||
return response;
|
||||
}
|
||||
return Reflect.get(target, prop, receiver);
|
||||
},
|
||||
set(target, prop, value, receiver) {
|
||||
if (prop === "headers") {
|
||||
headers = value;
|
||||
}
|
||||
else if (prop === "request") {
|
||||
request = value;
|
||||
}
|
||||
return Reflect.set(target, prop, value, receiver);
|
||||
},
|
||||
});
|
||||
}
|
||||
else {
|
||||
return {
|
||||
...response,
|
||||
request,
|
||||
headers,
|
||||
};
|
||||
}
|
||||
}
|
||||
/**
|
||||
* A helper to convert back to a PipelineResponse
|
||||
* @param compatResponse - A response compatible with `HttpOperationResponse` from core-http.
|
||||
*/
|
||||
export function toPipelineResponse(compatResponse) {
|
||||
const extendedCompatResponse = compatResponse;
|
||||
const response = extendedCompatResponse[originalResponse];
|
||||
const headers = createHttpHeaders(compatResponse.headers.toJson({ preserveCase: true }));
|
||||
if (response) {
|
||||
response.headers = headers;
|
||||
return response;
|
||||
}
|
||||
else {
|
||||
return {
|
||||
...compatResponse,
|
||||
headers,
|
||||
request: toPipelineRequest(compatResponse.request),
|
||||
};
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=response.js.map
|
||||
1
backend/node_modules/@azure/core-http-compat/dist/esm/response.js.map
generated
vendored
Normal file
1
backend/node_modules/@azure/core-http-compat/dist/esm/response.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../src/response.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAepF,MAAM,gBAAgB,GAAG,MAAM,CAAC,gCAAgC,CAAC,CAAC;AAGlE;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAC9B,QAA+B,EAC/B,OAAmC;IAEnC,IAAI,OAAO,GAAG,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAClD,IAAI,OAAO,GAAG,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAClD,IAAI,OAAO,EAAE,WAAW,EAAE,CAAC;QACzB,OAAO,IAAI,KAAK,CAAC,QAAQ,EAAE;YACzB,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ;gBACxB,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;oBACvB,OAAO,OAAO,CAAC;gBACjB,CAAC;qBAAM,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;oBAC9B,OAAO,OAAO,CAAC;gBACjB,CAAC;qBAAM,IAAI,IAAI,KAAK,gBAAgB,EAAE,CAAC;oBACrC,OAAO,QAAQ,CAAC;gBAClB,CAAC;gBACD,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;YAC7C,CAAC;YACD,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ;gBAC/B,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;oBACvB,OAAO,GAAG,KAAK,CAAC;gBAClB,CAAC;qBAAM,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;oBAC9B,OAAO,GAAG,KAAK,CAAC;gBAClB,CAAC;gBACD,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;YACpD,CAAC;SACF,CAA8B,CAAC;IAClC,CAAC;SAAM,CAAC;QACN,OAAO;YACL,GAAG,QAAQ;YACX,OAAO;YACP,OAAO;SACR,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,cAA8B;IAC/D,MAAM,sBAAsB,GAAG,cAAwC,CAAC;IACxE,MAAM,QAAQ,GAAG,sBAAsB,CAAC,gBAAgB,CAAC,CAAC;IAC1D,MAAM,OAAO,GAAG,iBAAiB,CAAC,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACzF,IAAI,QAAQ,EAAE,CAAC;QACb,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC;QAC3B,OAAO,QAAQ,CAAC;IAClB,CAAC;SAAM,CAAC;QACN,OAAO;YACL,GAAG,cAAc;YACjB,OAAO;YACP,OAAO,EAAE,iBAAiB,CAAC,cAAc,CAAC,OAAO,CAAC;SACnD,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { FullOperationResponse } from \"@azure/core-client\";\nimport type { PipelineResponse } from \"@azure/core-rest-pipeline\";\nimport { createHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport type { HttpHeadersLike, WebResourceLike } from \"./util.js\";\nimport { toHttpHeadersLike, toPipelineRequest, toWebResourceLike } from \"./util.js\";\n/**\n * Http Response that is compatible with the core-v1(core-http).\n */\nexport interface CompatResponse extends Omit<FullOperationResponse, \"request\" | \"headers\"> {\n /**\n * A description of a HTTP request to be made to a remote server.\n */\n request: WebResourceLike;\n /**\n * A collection of HTTP header key/value pairs.\n */\n headers: HttpHeadersLike;\n}\n\nconst originalResponse = Symbol(\"Original FullOperationResponse\");\ntype ExtendedCompatResponse = CompatResponse & { [originalResponse]?: FullOperationResponse };\n\n/**\n * A helper to convert response objects from the new pipeline back to the old one.\n * @param response - A response object from core-client.\n * @returns A response compatible with `HttpOperationResponse` from core-http.\n */\nexport function toCompatResponse(\n response: FullOperationResponse,\n options?: { createProxy?: boolean },\n): CompatResponse {\n let request = toWebResourceLike(response.request);\n let headers = toHttpHeadersLike(response.headers);\n if (options?.createProxy) {\n return new Proxy(response, {\n get(target, prop, receiver) {\n if (prop === \"headers\") {\n return headers;\n } else if (prop === \"request\") {\n return request;\n } else if (prop === originalResponse) {\n return response;\n }\n return Reflect.get(target, prop, receiver);\n },\n set(target, prop, value, receiver) {\n if (prop === \"headers\") {\n headers = value;\n } else if (prop === \"request\") {\n request = value;\n }\n return Reflect.set(target, prop, value, receiver);\n },\n }) as unknown as CompatResponse;\n } else {\n return {\n ...response,\n request,\n headers,\n };\n }\n}\n\n/**\n * A helper to convert back to a PipelineResponse\n * @param compatResponse - A response compatible with `HttpOperationResponse` from core-http.\n */\nexport function toPipelineResponse(compatResponse: CompatResponse): PipelineResponse {\n const extendedCompatResponse = compatResponse as ExtendedCompatResponse;\n const response = extendedCompatResponse[originalResponse];\n const headers = createHttpHeaders(compatResponse.headers.toJson({ preserveCase: true }));\n if (response) {\n response.headers = headers;\n return response;\n } else {\n return {\n ...compatResponse,\n headers,\n request: toPipelineRequest(compatResponse.request),\n };\n }\n}\n"]}
|
||||
298
backend/node_modules/@azure/core-http-compat/dist/esm/util.d.ts
generated
vendored
Normal file
298
backend/node_modules/@azure/core-http-compat/dist/esm/util.d.ts
generated
vendored
Normal file
@ -0,0 +1,298 @@
|
||||
import type { HttpMethods, ProxySettings } from "@azure/core-rest-pipeline";
|
||||
import type { AbortSignalLike } from "@azure/abort-controller";
|
||||
import type { HttpHeaders as HttpHeadersV2, PipelineRequest } from "@azure/core-rest-pipeline";
|
||||
export declare function toPipelineRequest(webResource: WebResourceLike, options?: {
|
||||
originalRequest?: PipelineRequest;
|
||||
}): PipelineRequest;
|
||||
export declare function toWebResourceLike(request: PipelineRequest, options?: {
|
||||
createProxy?: boolean;
|
||||
originalRequest?: PipelineRequest;
|
||||
}): WebResourceLike;
|
||||
/**
|
||||
* Converts HttpHeaders from core-rest-pipeline to look like
|
||||
* HttpHeaders from core-http.
|
||||
* @param headers - HttpHeaders from core-rest-pipeline
|
||||
* @returns HttpHeaders as they looked in core-http
|
||||
*/
|
||||
export declare function toHttpHeadersLike(headers: HttpHeadersV2): HttpHeadersLike;
|
||||
/**
|
||||
* An individual header within a HttpHeaders collection.
|
||||
*/
|
||||
export interface HttpHeader {
|
||||
/**
|
||||
* The name of the header.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The value of the header.
|
||||
*/
|
||||
value: string;
|
||||
}
|
||||
/**
|
||||
* A HttpHeaders collection represented as a simple JSON object.
|
||||
*/
|
||||
export type RawHttpHeaders = {
|
||||
[headerName: string]: string;
|
||||
};
|
||||
/**
|
||||
* A collection of HTTP header key/value pairs.
|
||||
*/
|
||||
export interface HttpHeadersLike {
|
||||
/**
|
||||
* Set a header in this collection with the provided name and value. The name is
|
||||
* case-insensitive.
|
||||
* @param headerName - The name of the header to set. This value is case-insensitive.
|
||||
* @param headerValue - The value of the header to set.
|
||||
*/
|
||||
set(headerName: string, headerValue: string | number): void;
|
||||
/**
|
||||
* Get the header value for the provided header name, or undefined if no header exists in this
|
||||
* collection with the provided name.
|
||||
* @param headerName - The name of the header.
|
||||
*/
|
||||
get(headerName: string): string | undefined;
|
||||
/**
|
||||
* Get whether or not this header collection contains a header entry for the provided header name.
|
||||
*/
|
||||
contains(headerName: string): boolean;
|
||||
/**
|
||||
* Remove the header with the provided headerName. Return whether or not the header existed and
|
||||
* was removed.
|
||||
* @param headerName - The name of the header to remove.
|
||||
*/
|
||||
remove(headerName: string): boolean;
|
||||
/**
|
||||
* Get the headers that are contained this collection as an object.
|
||||
*/
|
||||
rawHeaders(): RawHttpHeaders;
|
||||
/**
|
||||
* Get the headers that are contained in this collection as an array.
|
||||
*/
|
||||
headersArray(): HttpHeader[];
|
||||
/**
|
||||
* Get the header names that are contained in this collection.
|
||||
*/
|
||||
headerNames(): string[];
|
||||
/**
|
||||
* Get the header values that are contained in this collection.
|
||||
*/
|
||||
headerValues(): string[];
|
||||
/**
|
||||
* Create a deep clone/copy of this HttpHeaders collection.
|
||||
*/
|
||||
clone(): HttpHeadersLike;
|
||||
/**
|
||||
* Get the JSON object representation of this HTTP header collection.
|
||||
* The result is the same as `rawHeaders()`.
|
||||
*/
|
||||
toJson(options?: {
|
||||
preserveCase?: boolean;
|
||||
}): RawHttpHeaders;
|
||||
}
|
||||
/**
|
||||
* A collection of HTTP header key/value pairs.
|
||||
*/
|
||||
export declare class HttpHeaders implements HttpHeadersLike {
|
||||
private readonly _headersMap;
|
||||
constructor(rawHeaders?: RawHttpHeaders);
|
||||
/**
|
||||
* Set a header in this collection with the provided name and value. The name is
|
||||
* case-insensitive.
|
||||
* @param headerName - The name of the header to set. This value is case-insensitive.
|
||||
* @param headerValue - The value of the header to set.
|
||||
*/
|
||||
set(headerName: string, headerValue: string | number): void;
|
||||
/**
|
||||
* Get the header value for the provided header name, or undefined if no header exists in this
|
||||
* collection with the provided name.
|
||||
* @param headerName - The name of the header.
|
||||
*/
|
||||
get(headerName: string): string | undefined;
|
||||
/**
|
||||
* Get whether or not this header collection contains a header entry for the provided header name.
|
||||
*/
|
||||
contains(headerName: string): boolean;
|
||||
/**
|
||||
* Remove the header with the provided headerName. Return whether or not the header existed and
|
||||
* was removed.
|
||||
* @param headerName - The name of the header to remove.
|
||||
*/
|
||||
remove(headerName: string): boolean;
|
||||
/**
|
||||
* Get the headers that are contained this collection as an object.
|
||||
*/
|
||||
rawHeaders(): RawHttpHeaders;
|
||||
/**
|
||||
* Get the headers that are contained in this collection as an array.
|
||||
*/
|
||||
headersArray(): HttpHeader[];
|
||||
/**
|
||||
* Get the header names that are contained in this collection.
|
||||
*/
|
||||
headerNames(): string[];
|
||||
/**
|
||||
* Get the header values that are contained in this collection.
|
||||
*/
|
||||
headerValues(): string[];
|
||||
/**
|
||||
* Get the JSON object representation of this HTTP header collection.
|
||||
*/
|
||||
toJson(options?: {
|
||||
preserveCase?: boolean;
|
||||
}): RawHttpHeaders;
|
||||
/**
|
||||
* Get the string representation of this HTTP header collection.
|
||||
*/
|
||||
toString(): string;
|
||||
/**
|
||||
* Create a deep clone/copy of this HttpHeaders collection.
|
||||
*/
|
||||
clone(): HttpHeaders;
|
||||
}
|
||||
/**
|
||||
* An interface compatible with NodeJS's `http.Agent`.
|
||||
* We want to avoid publicly re-exporting the actual interface,
|
||||
* since it might vary across runtime versions.
|
||||
*/
|
||||
export interface Agent {
|
||||
/**
|
||||
* Destroy any sockets that are currently in use by the agent.
|
||||
*/
|
||||
destroy(): void;
|
||||
/**
|
||||
* For agents with keepAlive enabled, this sets the maximum number of sockets that will be left open in the free state.
|
||||
*/
|
||||
maxFreeSockets: number;
|
||||
/**
|
||||
* Determines how many concurrent sockets the agent can have open per origin.
|
||||
*/
|
||||
maxSockets: number;
|
||||
/**
|
||||
* An object which contains queues of requests that have not yet been assigned to sockets.
|
||||
*/
|
||||
requests: unknown;
|
||||
/**
|
||||
* An object which contains arrays of sockets currently in use by the agent.
|
||||
*/
|
||||
sockets: unknown;
|
||||
}
|
||||
/**
|
||||
* A description of a HTTP request to be made to a remote server.
|
||||
*/
|
||||
export interface WebResourceLike {
|
||||
/**
|
||||
* The URL being accessed by the request.
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
* The HTTP method to use when making the request.
|
||||
*/
|
||||
method: HttpMethods;
|
||||
/**
|
||||
* The HTTP body contents of the request.
|
||||
*/
|
||||
body?: any;
|
||||
/**
|
||||
* The HTTP headers to use when making the request.
|
||||
*/
|
||||
headers: HttpHeadersLike;
|
||||
/**
|
||||
* Whether or not the body of the HttpOperationResponse should be treated as a stream.
|
||||
* @deprecated Use streamResponseStatusCodes property instead.
|
||||
*/
|
||||
streamResponseBody?: boolean;
|
||||
/**
|
||||
* A list of response status codes whose corresponding HttpOperationResponse body should be treated as a stream.
|
||||
*/
|
||||
streamResponseStatusCodes?: Set<number>;
|
||||
/**
|
||||
* Form data, used to build the request body.
|
||||
*/
|
||||
formData?: any;
|
||||
/**
|
||||
* A query string represented as an object.
|
||||
*/
|
||||
query?: {
|
||||
[key: string]: any;
|
||||
};
|
||||
/**
|
||||
* If credentials (cookies) should be sent along during an XHR.
|
||||
*/
|
||||
withCredentials: boolean;
|
||||
/**
|
||||
* The number of milliseconds a request can take before automatically being terminated.
|
||||
* If the request is terminated, an `AbortError` is thrown.
|
||||
*/
|
||||
timeout: number;
|
||||
/**
|
||||
* Proxy configuration.
|
||||
*/
|
||||
proxySettings?: ProxySettings;
|
||||
/**
|
||||
* If the connection should be reused.
|
||||
*/
|
||||
keepAlive?: boolean;
|
||||
/**
|
||||
* Whether or not to decompress response according to Accept-Encoding header (node-fetch only)
|
||||
*/
|
||||
decompressResponse?: boolean;
|
||||
/**
|
||||
* A unique identifier for the request. Used for logging and tracing.
|
||||
*/
|
||||
requestId: string;
|
||||
/**
|
||||
* Signal of an abort controller. Can be used to abort both sending a network request and waiting for a response.
|
||||
*/
|
||||
abortSignal?: AbortSignalLike;
|
||||
/**
|
||||
* Callback which fires upon upload progress.
|
||||
*/
|
||||
onUploadProgress?: (progress: TransferProgressEvent) => void;
|
||||
/** Callback which fires upon download progress. */
|
||||
onDownloadProgress?: (progress: TransferProgressEvent) => void;
|
||||
/**
|
||||
* NODEJS ONLY
|
||||
*
|
||||
* A Node-only option to provide a custom `http.Agent`/`https.Agent`.
|
||||
* NOTE: usually this should be one instance shared by multiple requests so that the underlying
|
||||
* connection to the service can be reused.
|
||||
* Does nothing when running in the browser.
|
||||
*/
|
||||
agent?: Agent;
|
||||
/**
|
||||
* Additional options to set on the request. This provides a way to override
|
||||
* existing ones or provide request properties that are not declared.
|
||||
*
|
||||
* For possible valid properties, see
|
||||
* - NodeJS https.request options: https://nodejs.org/api/http.html#httprequestoptions-callback
|
||||
* - Browser RequestInit: https://developer.mozilla.org/en-US/docs/Web/API/RequestInit
|
||||
*
|
||||
* WARNING: Options specified here will override any properties of same names when request is sent by {@link HttpClient}.
|
||||
*/
|
||||
requestOverrides?: Record<string, unknown>;
|
||||
/**
|
||||
* Clone this request object.
|
||||
*/
|
||||
clone(): WebResourceLike;
|
||||
/**
|
||||
* Validates that the required properties such as method, url, headers["Content-Type"],
|
||||
* headers["accept-language"] are defined. It will throw an error if one of the above
|
||||
* mentioned properties are not defined.
|
||||
* Note: this a no-op for compat purposes.
|
||||
*/
|
||||
validateRequestProperties(): void;
|
||||
/**
|
||||
* This is a no-op for compat purposes and will throw if called.
|
||||
*/
|
||||
prepare(options: unknown): WebResourceLike;
|
||||
}
|
||||
/**
|
||||
* Fired in response to upload or download progress.
|
||||
*/
|
||||
export type TransferProgressEvent = {
|
||||
/**
|
||||
* The number of bytes loaded so far.
|
||||
*/
|
||||
loadedBytes: number;
|
||||
};
|
||||
//# sourceMappingURL=util.d.ts.map
|
||||
262
backend/node_modules/@azure/core-http-compat/dist/esm/util.js
generated
vendored
Normal file
262
backend/node_modules/@azure/core-http-compat/dist/esm/util.js
generated
vendored
Normal file
@ -0,0 +1,262 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { createHttpHeaders, createPipelineRequest } from "@azure/core-rest-pipeline";
|
||||
// We use a custom symbol to cache a reference to the original request without
|
||||
// exposing it on the public interface.
|
||||
const originalRequestSymbol = Symbol("Original PipelineRequest");
|
||||
// Symbol.for() will return the same symbol if it's already been created
|
||||
// This particular one is used in core-client to handle the case of when a request is
|
||||
// cloned but we need to retrieve the OperationSpec and OperationArguments from the
|
||||
// original request.
|
||||
const originalClientRequestSymbol = Symbol.for("@azure/core-client original request");
|
||||
export function toPipelineRequest(webResource, options = {}) {
|
||||
const compatWebResource = webResource;
|
||||
const request = compatWebResource[originalRequestSymbol];
|
||||
const headers = createHttpHeaders(webResource.headers.toJson({ preserveCase: true }));
|
||||
if (request) {
|
||||
request.headers = headers;
|
||||
return request;
|
||||
}
|
||||
else {
|
||||
const newRequest = createPipelineRequest({
|
||||
url: webResource.url,
|
||||
method: webResource.method,
|
||||
headers,
|
||||
withCredentials: webResource.withCredentials,
|
||||
timeout: webResource.timeout,
|
||||
requestId: webResource.requestId,
|
||||
abortSignal: webResource.abortSignal,
|
||||
body: webResource.body,
|
||||
formData: webResource.formData,
|
||||
disableKeepAlive: !!webResource.keepAlive,
|
||||
onDownloadProgress: webResource.onDownloadProgress,
|
||||
onUploadProgress: webResource.onUploadProgress,
|
||||
proxySettings: webResource.proxySettings,
|
||||
streamResponseStatusCodes: webResource.streamResponseStatusCodes,
|
||||
agent: webResource.agent,
|
||||
requestOverrides: webResource.requestOverrides,
|
||||
});
|
||||
if (options.originalRequest) {
|
||||
newRequest[originalClientRequestSymbol] =
|
||||
options.originalRequest;
|
||||
}
|
||||
return newRequest;
|
||||
}
|
||||
}
|
||||
export function toWebResourceLike(request, options) {
|
||||
const originalRequest = options?.originalRequest ?? request;
|
||||
const webResource = {
|
||||
url: request.url,
|
||||
method: request.method,
|
||||
headers: toHttpHeadersLike(request.headers),
|
||||
withCredentials: request.withCredentials,
|
||||
timeout: request.timeout,
|
||||
requestId: request.headers.get("x-ms-client-request-id") || request.requestId,
|
||||
abortSignal: request.abortSignal,
|
||||
body: request.body,
|
||||
formData: request.formData,
|
||||
keepAlive: !!request.disableKeepAlive,
|
||||
onDownloadProgress: request.onDownloadProgress,
|
||||
onUploadProgress: request.onUploadProgress,
|
||||
proxySettings: request.proxySettings,
|
||||
streamResponseStatusCodes: request.streamResponseStatusCodes,
|
||||
agent: request.agent,
|
||||
requestOverrides: request.requestOverrides,
|
||||
clone() {
|
||||
throw new Error("Cannot clone a non-proxied WebResourceLike");
|
||||
},
|
||||
prepare() {
|
||||
throw new Error("WebResourceLike.prepare() is not supported by @azure/core-http-compat");
|
||||
},
|
||||
validateRequestProperties() {
|
||||
/** do nothing */
|
||||
},
|
||||
};
|
||||
if (options?.createProxy) {
|
||||
return new Proxy(webResource, {
|
||||
get(target, prop, receiver) {
|
||||
if (prop === originalRequestSymbol) {
|
||||
return request;
|
||||
}
|
||||
else if (prop === "clone") {
|
||||
return () => {
|
||||
return toWebResourceLike(toPipelineRequest(webResource, { originalRequest }), {
|
||||
createProxy: true,
|
||||
originalRequest,
|
||||
});
|
||||
};
|
||||
}
|
||||
return Reflect.get(target, prop, receiver);
|
||||
},
|
||||
set(target, prop, value, receiver) {
|
||||
if (prop === "keepAlive") {
|
||||
request.disableKeepAlive = !value;
|
||||
}
|
||||
const passThroughProps = [
|
||||
"url",
|
||||
"method",
|
||||
"withCredentials",
|
||||
"timeout",
|
||||
"requestId",
|
||||
"abortSignal",
|
||||
"body",
|
||||
"formData",
|
||||
"onDownloadProgress",
|
||||
"onUploadProgress",
|
||||
"proxySettings",
|
||||
"streamResponseStatusCodes",
|
||||
"agent",
|
||||
"requestOverrides",
|
||||
];
|
||||
if (typeof prop === "string" && passThroughProps.includes(prop)) {
|
||||
request[prop] = value;
|
||||
}
|
||||
return Reflect.set(target, prop, value, receiver);
|
||||
},
|
||||
});
|
||||
}
|
||||
else {
|
||||
return webResource;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Converts HttpHeaders from core-rest-pipeline to look like
|
||||
* HttpHeaders from core-http.
|
||||
* @param headers - HttpHeaders from core-rest-pipeline
|
||||
* @returns HttpHeaders as they looked in core-http
|
||||
*/
|
||||
export function toHttpHeadersLike(headers) {
|
||||
return new HttpHeaders(headers.toJSON({ preserveCase: true }));
|
||||
}
|
||||
/**
|
||||
* A collection of HttpHeaders that can be sent with a HTTP request.
|
||||
*/
|
||||
function getHeaderKey(headerName) {
|
||||
return headerName.toLowerCase();
|
||||
}
|
||||
/**
|
||||
* A collection of HTTP header key/value pairs.
|
||||
*/
|
||||
export class HttpHeaders {
|
||||
_headersMap;
|
||||
constructor(rawHeaders) {
|
||||
this._headersMap = {};
|
||||
if (rawHeaders) {
|
||||
for (const headerName in rawHeaders) {
|
||||
this.set(headerName, rawHeaders[headerName]);
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Set a header in this collection with the provided name and value. The name is
|
||||
* case-insensitive.
|
||||
* @param headerName - The name of the header to set. This value is case-insensitive.
|
||||
* @param headerValue - The value of the header to set.
|
||||
*/
|
||||
set(headerName, headerValue) {
|
||||
this._headersMap[getHeaderKey(headerName)] = {
|
||||
name: headerName,
|
||||
value: headerValue.toString(),
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Get the header value for the provided header name, or undefined if no header exists in this
|
||||
* collection with the provided name.
|
||||
* @param headerName - The name of the header.
|
||||
*/
|
||||
get(headerName) {
|
||||
const header = this._headersMap[getHeaderKey(headerName)];
|
||||
return !header ? undefined : header.value;
|
||||
}
|
||||
/**
|
||||
* Get whether or not this header collection contains a header entry for the provided header name.
|
||||
*/
|
||||
contains(headerName) {
|
||||
return !!this._headersMap[getHeaderKey(headerName)];
|
||||
}
|
||||
/**
|
||||
* Remove the header with the provided headerName. Return whether or not the header existed and
|
||||
* was removed.
|
||||
* @param headerName - The name of the header to remove.
|
||||
*/
|
||||
remove(headerName) {
|
||||
const result = this.contains(headerName);
|
||||
delete this._headersMap[getHeaderKey(headerName)];
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* Get the headers that are contained this collection as an object.
|
||||
*/
|
||||
rawHeaders() {
|
||||
return this.toJson({ preserveCase: true });
|
||||
}
|
||||
/**
|
||||
* Get the headers that are contained in this collection as an array.
|
||||
*/
|
||||
headersArray() {
|
||||
const headers = [];
|
||||
for (const headerKey in this._headersMap) {
|
||||
headers.push(this._headersMap[headerKey]);
|
||||
}
|
||||
return headers;
|
||||
}
|
||||
/**
|
||||
* Get the header names that are contained in this collection.
|
||||
*/
|
||||
headerNames() {
|
||||
const headerNames = [];
|
||||
const headers = this.headersArray();
|
||||
for (let i = 0; i < headers.length; ++i) {
|
||||
headerNames.push(headers[i].name);
|
||||
}
|
||||
return headerNames;
|
||||
}
|
||||
/**
|
||||
* Get the header values that are contained in this collection.
|
||||
*/
|
||||
headerValues() {
|
||||
const headerValues = [];
|
||||
const headers = this.headersArray();
|
||||
for (let i = 0; i < headers.length; ++i) {
|
||||
headerValues.push(headers[i].value);
|
||||
}
|
||||
return headerValues;
|
||||
}
|
||||
/**
|
||||
* Get the JSON object representation of this HTTP header collection.
|
||||
*/
|
||||
toJson(options = {}) {
|
||||
const result = {};
|
||||
if (options.preserveCase) {
|
||||
for (const headerKey in this._headersMap) {
|
||||
const header = this._headersMap[headerKey];
|
||||
result[header.name] = header.value;
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (const headerKey in this._headersMap) {
|
||||
const header = this._headersMap[headerKey];
|
||||
result[getHeaderKey(header.name)] = header.value;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* Get the string representation of this HTTP header collection.
|
||||
*/
|
||||
toString() {
|
||||
return JSON.stringify(this.toJson({ preserveCase: true }));
|
||||
}
|
||||
/**
|
||||
* Create a deep clone/copy of this HttpHeaders collection.
|
||||
*/
|
||||
clone() {
|
||||
const resultPreservingCasing = {};
|
||||
for (const headerKey in this._headersMap) {
|
||||
const header = this._headersMap[headerKey];
|
||||
resultPreservingCasing[header.name] = header.value;
|
||||
}
|
||||
return new HttpHeaders(resultPreservingCasing);
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=util.js.map
|
||||
1
backend/node_modules/@azure/core-http-compat/dist/esm/util.js.map
generated
vendored
Normal file
1
backend/node_modules/@azure/core-http-compat/dist/esm/util.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
40
backend/node_modules/@azure/core-http-compat/dist/react-native/extendedClient.d.ts
generated
vendored
Normal file
40
backend/node_modules/@azure/core-http-compat/dist/react-native/extendedClient.d.ts
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
import type { KeepAliveOptions } from "./policies/keepAliveOptions.js";
|
||||
import type { RedirectOptions } from "./policies/redirectOptions.js";
|
||||
import type { CommonClientOptions, OperationArguments, OperationSpec, ServiceClientOptions } from "@azure/core-client";
|
||||
import { ServiceClient } from "@azure/core-client";
|
||||
/**
|
||||
* Options specific to Shim Clients.
|
||||
*/
|
||||
export interface ExtendedClientOptions {
|
||||
/**
|
||||
* Options to disable keep alive.
|
||||
*/
|
||||
keepAliveOptions?: KeepAliveOptions;
|
||||
/**
|
||||
* Options to redirect requests.
|
||||
*/
|
||||
redirectOptions?: RedirectOptions;
|
||||
}
|
||||
/**
|
||||
* Options that shim clients are expected to expose.
|
||||
*/
|
||||
export type ExtendedServiceClientOptions = ServiceClientOptions & ExtendedClientOptions;
|
||||
/**
|
||||
* The common set of options that custom shim clients are expected to expose.
|
||||
*/
|
||||
export type ExtendedCommonClientOptions = CommonClientOptions & ExtendedClientOptions;
|
||||
/**
|
||||
* Client to provide compatability between core V1 & V2.
|
||||
*/
|
||||
export declare class ExtendedServiceClient extends ServiceClient {
|
||||
constructor(options: ExtendedServiceClientOptions);
|
||||
/**
|
||||
* Compatible send operation request function.
|
||||
*
|
||||
* @param operationArguments - Operation arguments
|
||||
* @param operationSpec - Operation Spec
|
||||
* @returns
|
||||
*/
|
||||
sendOperationRequest<T>(operationArguments: OperationArguments, operationSpec: OperationSpec): Promise<T>;
|
||||
}
|
||||
//# sourceMappingURL=extendedClient.d.ts.map
|
||||
52
backend/node_modules/@azure/core-http-compat/dist/react-native/extendedClient.js
generated
vendored
Normal file
52
backend/node_modules/@azure/core-http-compat/dist/react-native/extendedClient.js
generated
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { createDisableKeepAlivePolicy, pipelineContainsDisableKeepAlivePolicy, } from "./policies/disableKeepAlivePolicy.js";
|
||||
import { redirectPolicyName } from "@azure/core-rest-pipeline";
|
||||
import { ServiceClient } from "@azure/core-client";
|
||||
import { toCompatResponse } from "./response.js";
|
||||
/**
|
||||
* Client to provide compatability between core V1 & V2.
|
||||
*/
|
||||
export class ExtendedServiceClient extends ServiceClient {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
if (options.keepAliveOptions?.enable === false &&
|
||||
!pipelineContainsDisableKeepAlivePolicy(this.pipeline)) {
|
||||
this.pipeline.addPolicy(createDisableKeepAlivePolicy());
|
||||
}
|
||||
if (options.redirectOptions?.handleRedirects === false) {
|
||||
this.pipeline.removePolicy({
|
||||
name: redirectPolicyName,
|
||||
});
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Compatible send operation request function.
|
||||
*
|
||||
* @param operationArguments - Operation arguments
|
||||
* @param operationSpec - Operation Spec
|
||||
* @returns
|
||||
*/
|
||||
async sendOperationRequest(operationArguments, operationSpec) {
|
||||
const userProvidedCallBack = operationArguments?.options?.onResponse;
|
||||
let lastResponse;
|
||||
function onResponse(rawResponse, flatResponse, error) {
|
||||
lastResponse = rawResponse;
|
||||
if (userProvidedCallBack) {
|
||||
userProvidedCallBack(rawResponse, flatResponse, error);
|
||||
}
|
||||
}
|
||||
operationArguments.options = {
|
||||
...operationArguments.options,
|
||||
onResponse,
|
||||
};
|
||||
const result = await super.sendOperationRequest(operationArguments, operationSpec);
|
||||
if (lastResponse) {
|
||||
Object.defineProperty(result, "_response", {
|
||||
value: toCompatResponse(lastResponse),
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=extendedClient.js.map
|
||||
1
backend/node_modules/@azure/core-http-compat/dist/react-native/extendedClient.js.map
generated
vendored
Normal file
1
backend/node_modules/@azure/core-http-compat/dist/react-native/extendedClient.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"extendedClient.js","sourceRoot":"","sources":["../../src/extendedClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EACL,4BAA4B,EAC5B,sCAAsC,GACvC,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAS/D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AA0BjD;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,aAAa;IACtD,YAAY,OAAqC;QAC/C,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IACE,OAAO,CAAC,gBAAgB,EAAE,MAAM,KAAK,KAAK;YAC1C,CAAC,sCAAsC,CAAC,IAAI,CAAC,QAAQ,CAAC,EACtD,CAAC;YACD,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,4BAA4B,EAAE,CAAC,CAAC;QAC1D,CAAC;QAED,IAAI,OAAO,CAAC,eAAe,EAAE,eAAe,KAAK,KAAK,EAAE,CAAC;YACvD,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC;gBACzB,IAAI,EAAE,kBAAkB;aACzB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,oBAAoB,CACxB,kBAAsC,EACtC,aAA4B;QAE5B,MAAM,oBAAoB,GACxB,kBAAkB,EAAE,OAAO,EAAE,UAAU,CAAC;QAE1C,IAAI,YAA+C,CAAC;QAEpD,SAAS,UAAU,CACjB,WAAkC,EAClC,YAAqB,EACrB,KAAe;YAEf,YAAY,GAAG,WAAW,CAAC;YAC3B,IAAI,oBAAoB,EAAE,CAAC;gBACzB,oBAAoB,CAAC,WAAW,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;YACzD,CAAC;QACH,CAAC;QAED,kBAAkB,CAAC,OAAO,GAAG;YAC3B,GAAG,kBAAkB,CAAC,OAAO;YAC7B,UAAU;SACX,CAAC;QAEF,MAAM,MAAM,GAAM,MAAM,KAAK,CAAC,oBAAoB,CAAC,kBAAkB,EAAE,aAAa,CAAC,CAAC;QAEtF,IAAI,YAAY,EAAE,CAAC;YACjB,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE;gBACzC,KAAK,EAAE,gBAAgB,CAAC,YAAY,CAAC;aACtC,CAAC,CAAC;QACL,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { KeepAliveOptions } from \"./policies/keepAliveOptions.js\";\nimport {\n createDisableKeepAlivePolicy,\n pipelineContainsDisableKeepAlivePolicy,\n} from \"./policies/disableKeepAlivePolicy.js\";\nimport type { RedirectOptions } from \"./policies/redirectOptions.js\";\nimport { redirectPolicyName } from \"@azure/core-rest-pipeline\";\nimport type {\n CommonClientOptions,\n FullOperationResponse,\n OperationArguments,\n OperationSpec,\n RawResponseCallback,\n ServiceClientOptions,\n} from \"@azure/core-client\";\nimport { ServiceClient } from \"@azure/core-client\";\nimport { toCompatResponse } from \"./response.js\";\n\n/**\n * Options specific to Shim Clients.\n */\nexport interface ExtendedClientOptions {\n /**\n * Options to disable keep alive.\n */\n keepAliveOptions?: KeepAliveOptions;\n /**\n * Options to redirect requests.\n */\n redirectOptions?: RedirectOptions;\n}\n\n/**\n * Options that shim clients are expected to expose.\n */\nexport type ExtendedServiceClientOptions = ServiceClientOptions & ExtendedClientOptions;\n\n/**\n * The common set of options that custom shim clients are expected to expose.\n */\nexport type ExtendedCommonClientOptions = CommonClientOptions & ExtendedClientOptions;\n\n/**\n * Client to provide compatability between core V1 & V2.\n */\nexport class ExtendedServiceClient extends ServiceClient {\n constructor(options: ExtendedServiceClientOptions) {\n super(options);\n\n if (\n options.keepAliveOptions?.enable === false &&\n !pipelineContainsDisableKeepAlivePolicy(this.pipeline)\n ) {\n this.pipeline.addPolicy(createDisableKeepAlivePolicy());\n }\n\n if (options.redirectOptions?.handleRedirects === false) {\n this.pipeline.removePolicy({\n name: redirectPolicyName,\n });\n }\n }\n\n /**\n * Compatible send operation request function.\n *\n * @param operationArguments - Operation arguments\n * @param operationSpec - Operation Spec\n * @returns\n */\n async sendOperationRequest<T>(\n operationArguments: OperationArguments,\n operationSpec: OperationSpec,\n ): Promise<T> {\n const userProvidedCallBack: RawResponseCallback | undefined =\n operationArguments?.options?.onResponse;\n\n let lastResponse: FullOperationResponse | undefined;\n\n function onResponse(\n rawResponse: FullOperationResponse,\n flatResponse: unknown,\n error?: unknown,\n ): void {\n lastResponse = rawResponse;\n if (userProvidedCallBack) {\n userProvidedCallBack(rawResponse, flatResponse, error);\n }\n }\n\n operationArguments.options = {\n ...operationArguments.options,\n onResponse,\n };\n\n const result: T = await super.sendOperationRequest(operationArguments, operationSpec);\n\n if (lastResponse) {\n Object.defineProperty(result, \"_response\", {\n value: toCompatResponse(lastResponse),\n });\n }\n\n return result;\n }\n}\n"]}
|
||||
9
backend/node_modules/@azure/core-http-compat/dist/react-native/httpClientAdapter.d.ts
generated
vendored
Normal file
9
backend/node_modules/@azure/core-http-compat/dist/react-native/httpClientAdapter.d.ts
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
import type { HttpClient } from "@azure/core-rest-pipeline";
|
||||
import type { RequestPolicy } from "./policies/requestPolicyFactoryPolicy.js";
|
||||
/**
|
||||
* Converts a RequestPolicy based HttpClient to a PipelineRequest based HttpClient.
|
||||
* @param requestPolicyClient - A HttpClient compatible with core-http
|
||||
* @returns A HttpClient compatible with core-rest-pipeline
|
||||
*/
|
||||
export declare function convertHttpClient(requestPolicyClient: RequestPolicy): HttpClient;
|
||||
//# sourceMappingURL=httpClientAdapter.d.ts.map
|
||||
18
backend/node_modules/@azure/core-http-compat/dist/react-native/httpClientAdapter.js
generated
vendored
Normal file
18
backend/node_modules/@azure/core-http-compat/dist/react-native/httpClientAdapter.js
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { toPipelineResponse } from "./response.js";
|
||||
import { toWebResourceLike } from "./util.js";
|
||||
/**
|
||||
* Converts a RequestPolicy based HttpClient to a PipelineRequest based HttpClient.
|
||||
* @param requestPolicyClient - A HttpClient compatible with core-http
|
||||
* @returns A HttpClient compatible with core-rest-pipeline
|
||||
*/
|
||||
export function convertHttpClient(requestPolicyClient) {
|
||||
return {
|
||||
sendRequest: async (request) => {
|
||||
const response = await requestPolicyClient.sendRequest(toWebResourceLike(request, { createProxy: true }));
|
||||
return toPipelineResponse(response);
|
||||
},
|
||||
};
|
||||
}
|
||||
//# sourceMappingURL=httpClientAdapter.js.map
|
||||
1
backend/node_modules/@azure/core-http-compat/dist/react-native/httpClientAdapter.js.map
generated
vendored
Normal file
1
backend/node_modules/@azure/core-http-compat/dist/react-native/httpClientAdapter.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"httpClientAdapter.js","sourceRoot":"","sources":["../../src/httpClientAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,mBAAkC;IAClE,OAAO;QACL,WAAW,EAAE,KAAK,EAAE,OAAwB,EAA6B,EAAE;YACzE,MAAM,QAAQ,GAAG,MAAM,mBAAmB,CAAC,WAAW,CACpD,iBAAiB,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAClD,CAAC;YACF,OAAO,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QACtC,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { HttpClient, PipelineRequest, PipelineResponse } from \"@azure/core-rest-pipeline\";\nimport type { RequestPolicy } from \"./policies/requestPolicyFactoryPolicy.js\";\nimport { toPipelineResponse } from \"./response.js\";\nimport { toWebResourceLike } from \"./util.js\";\n\n/**\n * Converts a RequestPolicy based HttpClient to a PipelineRequest based HttpClient.\n * @param requestPolicyClient - A HttpClient compatible with core-http\n * @returns A HttpClient compatible with core-rest-pipeline\n */\nexport function convertHttpClient(requestPolicyClient: RequestPolicy): HttpClient {\n return {\n sendRequest: async (request: PipelineRequest): Promise<PipelineResponse> => {\n const response = await requestPolicyClient.sendRequest(\n toWebResourceLike(request, { createProxy: true }),\n );\n return toPipelineResponse(response);\n },\n };\n}\n"]}
|
||||
15
backend/node_modules/@azure/core-http-compat/dist/react-native/index.d.ts
generated
vendored
Normal file
15
backend/node_modules/@azure/core-http-compat/dist/react-native/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* A Shim Library that provides compatibility between Core V1 & V2 Packages.
|
||||
*
|
||||
* @packageDocumentation
|
||||
*/
|
||||
export { ExtendedServiceClient, type ExtendedServiceClientOptions, type ExtendedCommonClientOptions, type ExtendedClientOptions, } from "./extendedClient.js";
|
||||
export { toCompatResponse } from "./response.js";
|
||||
export type { CompatResponse } from "./response.js";
|
||||
export { requestPolicyFactoryPolicyName, createRequestPolicyFactoryPolicy, type RequestPolicyFactory, type RequestPolicy, type RequestPolicyOptionsLike, HttpPipelineLogLevel, } from "./policies/requestPolicyFactoryPolicy.js";
|
||||
export type { KeepAliveOptions } from "./policies/keepAliveOptions.js";
|
||||
export type { RedirectOptions } from "./policies/redirectOptions.js";
|
||||
export { disableKeepAlivePolicyName } from "./policies/disableKeepAlivePolicy.js";
|
||||
export { convertHttpClient } from "./httpClientAdapter.js";
|
||||
export { type Agent, type WebResourceLike, type HttpHeadersLike, type RawHttpHeaders, type HttpHeader, type TransferProgressEvent, toHttpHeadersLike, } from "./util.js";
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
14
backend/node_modules/@azure/core-http-compat/dist/react-native/index.js
generated
vendored
Normal file
14
backend/node_modules/@azure/core-http-compat/dist/react-native/index.js
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
/**
|
||||
* A Shim Library that provides compatibility between Core V1 & V2 Packages.
|
||||
*
|
||||
* @packageDocumentation
|
||||
*/
|
||||
export { ExtendedServiceClient, } from "./extendedClient.js";
|
||||
export { toCompatResponse } from "./response.js";
|
||||
export { requestPolicyFactoryPolicyName, createRequestPolicyFactoryPolicy, HttpPipelineLogLevel, } from "./policies/requestPolicyFactoryPolicy.js";
|
||||
export { disableKeepAlivePolicyName } from "./policies/disableKeepAlivePolicy.js";
|
||||
export { convertHttpClient } from "./httpClientAdapter.js";
|
||||
export { toHttpHeadersLike, } from "./util.js";
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
backend/node_modules/@azure/core-http-compat/dist/react-native/index.js.map
generated
vendored
Normal file
1
backend/node_modules/@azure/core-http-compat/dist/react-native/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;GAIG;AACH,OAAO,EACL,qBAAqB,GAItB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EACL,8BAA8B,EAC9B,gCAAgC,EAIhC,oBAAoB,GACrB,MAAM,0CAA0C,CAAC;AAGlD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAOL,iBAAiB,GAClB,MAAM,WAAW,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * A Shim Library that provides compatibility between Core V1 & V2 Packages.\n *\n * @packageDocumentation\n */\nexport {\n ExtendedServiceClient,\n type ExtendedServiceClientOptions,\n type ExtendedCommonClientOptions,\n type ExtendedClientOptions,\n} from \"./extendedClient.js\";\nexport { toCompatResponse } from \"./response.js\";\nexport type { CompatResponse } from \"./response.js\";\nexport {\n requestPolicyFactoryPolicyName,\n createRequestPolicyFactoryPolicy,\n type RequestPolicyFactory,\n type RequestPolicy,\n type RequestPolicyOptionsLike,\n HttpPipelineLogLevel,\n} from \"./policies/requestPolicyFactoryPolicy.js\";\nexport type { KeepAliveOptions } from \"./policies/keepAliveOptions.js\";\nexport type { RedirectOptions } from \"./policies/redirectOptions.js\";\nexport { disableKeepAlivePolicyName } from \"./policies/disableKeepAlivePolicy.js\";\nexport { convertHttpClient } from \"./httpClientAdapter.js\";\nexport {\n type Agent,\n type WebResourceLike,\n type HttpHeadersLike,\n type RawHttpHeaders,\n type HttpHeader,\n type TransferProgressEvent,\n toHttpHeadersLike,\n} from \"./util.js\";\n"]}
|
||||
3
backend/node_modules/@azure/core-http-compat/dist/react-native/package.json
generated
vendored
Normal file
3
backend/node_modules/@azure/core-http-compat/dist/react-native/package.json
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
8
backend/node_modules/@azure/core-http-compat/dist/react-native/policies/disableKeepAlivePolicy.d.ts
generated
vendored
Normal file
8
backend/node_modules/@azure/core-http-compat/dist/react-native/policies/disableKeepAlivePolicy.d.ts
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import type { Pipeline, PipelinePolicy } from "@azure/core-rest-pipeline";
|
||||
export declare const disableKeepAlivePolicyName = "DisableKeepAlivePolicy";
|
||||
export declare function createDisableKeepAlivePolicy(): PipelinePolicy;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare function pipelineContainsDisableKeepAlivePolicy(pipeline: Pipeline): boolean;
|
||||
//# sourceMappingURL=disableKeepAlivePolicy.d.ts.map
|
||||
19
backend/node_modules/@azure/core-http-compat/dist/react-native/policies/disableKeepAlivePolicy.js
generated
vendored
Normal file
19
backend/node_modules/@azure/core-http-compat/dist/react-native/policies/disableKeepAlivePolicy.js
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
export const disableKeepAlivePolicyName = "DisableKeepAlivePolicy";
|
||||
export function createDisableKeepAlivePolicy() {
|
||||
return {
|
||||
name: disableKeepAlivePolicyName,
|
||||
async sendRequest(request, next) {
|
||||
request.disableKeepAlive = true;
|
||||
return next(request);
|
||||
},
|
||||
};
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export function pipelineContainsDisableKeepAlivePolicy(pipeline) {
|
||||
return pipeline.getOrderedPolicies().some((policy) => policy.name === disableKeepAlivePolicyName);
|
||||
}
|
||||
//# sourceMappingURL=disableKeepAlivePolicy.js.map
|
||||
1
backend/node_modules/@azure/core-http-compat/dist/react-native/policies/disableKeepAlivePolicy.js.map
generated
vendored
Normal file
1
backend/node_modules/@azure/core-http-compat/dist/react-native/policies/disableKeepAlivePolicy.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"disableKeepAlivePolicy.js","sourceRoot":"","sources":["../../../src/policies/disableKeepAlivePolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAUlC,MAAM,CAAC,MAAM,0BAA0B,GAAG,wBAAwB,CAAC;AAEnE,MAAM,UAAU,4BAA4B;IAC1C,OAAO;QACL,IAAI,EAAE,0BAA0B;QAChC,KAAK,CAAC,WAAW,CAAC,OAAwB,EAAE,IAAiB;YAC3D,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;YAChC,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sCAAsC,CAAC,QAAkB;IACvE,OAAO,QAAQ,CAAC,kBAAkB,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,0BAA0B,CAAC,CAAC;AACpG,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n Pipeline,\n PipelinePolicy,\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\n\nexport const disableKeepAlivePolicyName = \"DisableKeepAlivePolicy\";\n\nexport function createDisableKeepAlivePolicy(): PipelinePolicy {\n return {\n name: disableKeepAlivePolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise<PipelineResponse> {\n request.disableKeepAlive = true;\n return next(request);\n },\n };\n}\n\n/**\n * @internal\n */\nexport function pipelineContainsDisableKeepAlivePolicy(pipeline: Pipeline): boolean {\n return pipeline.getOrderedPolicies().some((policy) => policy.name === disableKeepAlivePolicyName);\n}\n"]}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user