MCPcopy Create free account
hub / github.com/di-sukharev/opencommit / client

Function client

out/cli.cjs:77467–77495  ·  view source on GitHub ↗
(path5, ...args)

Source from the content-addressed store, hash-verified

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);

Callers

nothing calls this directly

Calls 2

buildOperationFunction · 0.85
getUrlFunction · 0.85

Tested by

no test coverage detected