(endpoint, credentialsOrPipelineOptions, clientOptions = {})
| 77444 | } |
| 77445 | return routePath; |
| 77446 | } |
| 77447 | function replaceAll(value, searchValue, replaceValue) { |
| 77448 | return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || ""); |
| 77449 | } |
| 77450 | |
| 77451 | // node_modules/@azure-rest/core-client/dist/esm/getClient.js |
| 77452 | function getClient(endpoint, credentialsOrPipelineOptions, clientOptions = {}) { |
| 77453 | var _a5, _b2; |
| 77454 | let credentials; |
| 77455 | if (credentialsOrPipelineOptions) { |
| 77456 | if (isCredential(credentialsOrPipelineOptions)) { |
| 77457 | credentials = credentialsOrPipelineOptions; |
| 77458 | } else { |
| 77459 | clientOptions = credentialsOrPipelineOptions !== null && credentialsOrPipelineOptions !== void 0 ? credentialsOrPipelineOptions : {}; |
| 77460 | } |
| 77461 | } |
| 77462 | const pipeline = createDefaultPipeline(endpoint, credentials, clientOptions); |
| 77463 | if ((_a5 = clientOptions.additionalPolicies) === null || _a5 === void 0 ? void 0 : _a5.length) { |
| 77464 | for (const { policy, position } of clientOptions.additionalPolicies) { |
| 77465 | const afterPhase = position === "perRetry" ? "Sign" : void 0; |
| 77466 | pipeline.addPolicy(policy, { |
| 77467 | afterPhase |
| 77468 | }); |
| 77469 | } |
| 77470 | } |
| 77471 | const { allowInsecureConnection, httpClient } = clientOptions; |
| 77472 | const endpointUrl = (_b2 = clientOptions.endpoint) !== null && _b2 !== void 0 ? _b2 : endpoint; |
| 77473 | const client = (path5, ...args) => { |
| 77474 | const getUrl = (requestOptions) => buildRequestUrl(endpointUrl, path5, args, Object.assign({ allowInsecureConnection }, requestOptions)); |
| 77475 | return { |
| 77476 | get: (requestOptions = {}) => { |
| 77477 | return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); |
| 77478 | }, |
| 77479 | post: (requestOptions = {}) => { |
| 77480 | return buildOperation("POST", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); |
| 77481 | }, |
| 77482 | put: (requestOptions = {}) => { |
| 77483 | return buildOperation("PUT", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); |
| 77484 | }, |
| 77485 | patch: (requestOptions = {}) => { |
| 77486 | return buildOperation("PATCH", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); |
| 77487 | }, |
| 77488 | delete: (requestOptions = {}) => { |
| 77489 | return buildOperation("DELETE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); |
| 77490 | }, |
| 77491 | head: (requestOptions = {}) => { |
| 77492 | return buildOperation("HEAD", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); |
| 77493 | }, |
| 77494 | options: (requestOptions = {}) => { |
| 77495 | return buildOperation("OPTIONS", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); |
| 77496 | }, |
| 77497 | trace: (requestOptions = {}) => { |
| 77498 | return buildOperation("TRACE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); |
| 77499 | } |
| 77500 | }; |
| 77501 | }; |
| 77502 | return { |
| 77503 | path: client, |
no test coverage detected
searching dependent graphs…