@forklaunch/core 0.14.11-beta.1 → 0.14.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/http/index.d.mts +2 -39
- package/lib/http/index.d.ts +2 -39
- package/lib/http/index.js +2 -26
- package/lib/http/index.js.map +1 -1
- package/lib/http/index.mjs +2 -26
- package/lib/http/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/http/index.d.mts
CHANGED
@@ -1960,36 +1960,6 @@ declare function discriminateResponseBodies<SV extends AnySchemaValidator>(schem
|
|
1960
1960
|
schema: SV["_ValidSchemaObject"];
|
1961
1961
|
}>;
|
1962
1962
|
|
1963
|
-
/**
|
1964
|
-
* Configuration options for SDK client creation.
|
1965
|
-
*/
|
1966
|
-
interface SdkClientOptions {
|
1967
|
-
/**
|
1968
|
-
* Enable performance optimizations for better autocomplete.
|
1969
|
-
* This may slightly change type inference behavior but improves IDE performance.
|
1970
|
-
* @default false
|
1971
|
-
*/
|
1972
|
-
optimizePerformance?: boolean;
|
1973
|
-
/**
|
1974
|
-
* Use lazy evaluation for SDK and fetch properties.
|
1975
|
-
* This defers computation until first access, improving initial load time.
|
1976
|
-
* @default false
|
1977
|
-
*/
|
1978
|
-
lazyEvaluation?: boolean;
|
1979
|
-
}
|
1980
|
-
/**
|
1981
|
-
* Optimized return type for better autocomplete performance.
|
1982
|
-
* Uses simpler type structures that TypeScript can process more efficiently.
|
1983
|
-
*/
|
1984
|
-
type OptimizedSdkClient<SV extends AnySchemaValidator, T extends RouterMap<SV>> = {
|
1985
|
-
readonly _finalizedSdk: true;
|
1986
|
-
readonly sdk: {
|
1987
|
-
[K in keyof T]: T[K] extends {
|
1988
|
-
sdk: infer S;
|
1989
|
-
} ? S : T[K] extends RouterMap<SV> ? OptimizedSdkClient<SV, T[K]>['sdk'] : never;
|
1990
|
-
};
|
1991
|
-
readonly fetch: FetchFunction<MapToFetch<SV, T>>;
|
1992
|
-
};
|
1993
1963
|
/**
|
1994
1964
|
* Creates a complete SDK client from a RouterMap configuration.
|
1995
1965
|
* This is the main entry point for creating type-safe SDK clients that combine
|
@@ -1999,7 +1969,6 @@ type OptimizedSdkClient<SV extends AnySchemaValidator, T extends RouterMap<SV>>
|
|
1999
1969
|
* @template T - The RouterMap type to create the SDK client from
|
2000
1970
|
* @param schemaValidator - The schema validator instance used for validation and type constraints
|
2001
1971
|
* @param routerMap - The router map containing the complete API configuration
|
2002
|
-
* @param options - Optional configuration for performance optimization
|
2003
1972
|
*
|
2004
1973
|
* @returns An object containing both the SDK interface and fetch function:
|
2005
1974
|
* - `sdk`: The extracted SDK interfaces for direct method calls
|
@@ -2027,19 +1996,13 @@ type OptimizedSdkClient<SV extends AnySchemaValidator, T extends RouterMap<SV>>
|
|
2027
1996
|
*
|
2028
1997
|
* // Use fetch function for custom requests
|
2029
1998
|
* const response = await client.fetch('getUser', { params: { id: '123' } });
|
2030
|
-
*
|
2031
|
-
* // For better autocomplete performance in large projects:
|
2032
|
-
* const optimizedClient = sdkClient(zodValidator, routerMap, { optimizePerformance: true });
|
2033
1999
|
* ```
|
2034
2000
|
*/
|
2035
|
-
declare function sdkClient<SV extends AnySchemaValidator, T extends RouterMap<SV>>(schemaValidator: SV, routerMap: T
|
2001
|
+
declare function sdkClient<SV extends AnySchemaValidator, T extends RouterMap<SV>>(schemaValidator: SV, routerMap: T): {
|
2036
2002
|
_finalizedSdk: true;
|
2037
2003
|
sdk: MapToSdk<SV, T>;
|
2038
2004
|
fetch: FetchFunction<MapToFetch<SV, T>>;
|
2039
2005
|
};
|
2040
|
-
declare function sdkClient<SV extends AnySchemaValidator, T extends RouterMap<SV>>(schemaValidator: SV, routerMap: T, options: SdkClientOptions & {
|
2041
|
-
optimizePerformance: true;
|
2042
|
-
}): OptimizedSdkClient<SV, T>;
|
2043
2006
|
|
2044
2007
|
/**
|
2045
2008
|
* Creates a type-safe SDK router by mapping controller definitions to router SDK functions.
|
@@ -2226,4 +2189,4 @@ declare function logger(level: LevelWithSilentOrString, meta?: AnyValueMap): Pin
|
|
2226
2189
|
|
2227
2190
|
declare function recordMetric<SV extends AnySchemaValidator, P extends ParamsDictionary, ReqBody extends Record<string, unknown>, ReqQuery extends ParsedQs, ResBodyMap extends Record<string, unknown>, ReqHeaders extends Record<string, string>, ResHeaders extends Record<string, unknown>, LocalsObj extends Record<string, unknown>, VersionedReqs extends VersionedRequests, SessionSchema extends Record<string, unknown>>(req: ForklaunchRequest<SV, P, ReqBody, ReqQuery, ReqHeaders, Extract<keyof VersionedReqs, string>, SessionSchema>, res: ForklaunchResponse<unknown, ResBodyMap, ResHeaders, LocalsObj, Extract<keyof VersionedReqs, string>>): void;
|
2228
2191
|
|
2229
|
-
export { ATTR_API_NAME, ATTR_CORRELATION_ID, type AuthMethods, type AuthMethodsBase, type BasicAuthMethods, type Body, type BodyObject, type ClusterConfig, type ConstrainedForklaunchRouter, type ContractDetails, type ContractDetailsExpressLikeSchemaHandler, type ContractDetailsOrMiddlewareOrTypedHandler, type DecodeResource, type DocsConfiguration, type ErrorContainer, type ExpressLikeApplicationOptions, type ExpressLikeAuthMapper, type ExpressLikeGlobalAuthOptions, type ExpressLikeHandler, type ExpressLikeRouter, type ExpressLikeRouterOptions, type ExpressLikeSchemaAuthMapper, type ExpressLikeSchemaGlobalAuthOptions, type ExpressLikeSchemaHandler, type ExpressLikeTypedHandler, type ExtractBody, type ExtractContentType, type ExtractLiveTypeFn, type ExtractResponseBody, type ExtractedParamsObject, type FetchFunction, type FileBody, type ForklaunchBaseRequest, ForklaunchExpressLikeApplication, ForklaunchExpressLikeRouter, type ForklaunchNextFunction, type ForklaunchRequest, type ForklaunchResErrors, type ForklaunchResHeaders, type ForklaunchResponse, type ForklaunchRoute, type ForklaunchRouter, type ForklaunchSendableData, type ForklaunchStatusResponse, HTTPStatuses, type HeadersObject, type HmacMethods, type HttpContractDetails, type HttpMethod, type JsonBody, type JwtAuthMethods, type LiveSdkFunction, type LiveTypeFunction, type LiveTypeFunctionRequestInit, type LiveTypeRouteDefinition, type LogFn, type LoggerMeta, type MapControllerToSdk, type MapParamsSchema, type MapReqBodySchema, type MapReqHeadersSchema, type MapReqQuerySchema, type MapResBodyMapSchema, type MapResHeadersSchema, type MapSchema, type MapSessionSchema, type MapToFetch, type MapToSdk, type MapVersionedReqsSchema, type MapVersionedRespsSchema, type Method, type MetricType, type MetricsDefinition, type MiddlewareContractDetails, type MiddlewareOrMiddlewareWithTypedHandler, type MultipartForm, type NestableRouterBasedHandler, type NumberOnlyObject, OPENAPI_DEFAULT_VERSION, OpenTelemetryCollector, type
|
2192
|
+
export { ATTR_API_NAME, ATTR_CORRELATION_ID, type AuthMethods, type AuthMethodsBase, type BasicAuthMethods, type Body, type BodyObject, type ClusterConfig, type ConstrainedForklaunchRouter, type ContractDetails, type ContractDetailsExpressLikeSchemaHandler, type ContractDetailsOrMiddlewareOrTypedHandler, type DecodeResource, type DocsConfiguration, type ErrorContainer, type ExpressLikeApplicationOptions, type ExpressLikeAuthMapper, type ExpressLikeGlobalAuthOptions, type ExpressLikeHandler, type ExpressLikeRouter, type ExpressLikeRouterOptions, type ExpressLikeSchemaAuthMapper, type ExpressLikeSchemaGlobalAuthOptions, type ExpressLikeSchemaHandler, type ExpressLikeTypedHandler, type ExtractBody, type ExtractContentType, type ExtractLiveTypeFn, type ExtractResponseBody, type ExtractedParamsObject, type FetchFunction, type FileBody, type ForklaunchBaseRequest, ForklaunchExpressLikeApplication, ForklaunchExpressLikeRouter, type ForklaunchNextFunction, type ForklaunchRequest, type ForklaunchResErrors, type ForklaunchResHeaders, type ForklaunchResponse, type ForklaunchRoute, type ForklaunchRouter, type ForklaunchSendableData, type ForklaunchStatusResponse, HTTPStatuses, type HeadersObject, type HmacMethods, type HttpContractDetails, type HttpMethod, type JsonBody, type JwtAuthMethods, type LiveSdkFunction, type LiveTypeFunction, type LiveTypeFunctionRequestInit, type LiveTypeRouteDefinition, type LogFn, type LoggerMeta, type MapControllerToSdk, type MapParamsSchema, type MapReqBodySchema, type MapReqHeadersSchema, type MapReqQuerySchema, type MapResBodyMapSchema, type MapResHeadersSchema, type MapSchema, type MapSessionSchema, type MapToFetch, type MapToSdk, type MapVersionedReqsSchema, type MapVersionedRespsSchema, type Method, type MetricType, type MetricsDefinition, type MiddlewareContractDetails, type MiddlewareOrMiddlewareWithTypedHandler, type MultipartForm, type NestableRouterBasedHandler, type NumberOnlyObject, OPENAPI_DEFAULT_VERSION, OpenTelemetryCollector, type ParamsDictionary, type ParamsObject, type PathBasedHandler, type PathMatch, type PathOrMiddlewareBasedHandler, type PathParamHttpContractDetails, type PathParamMethod, type QueryObject, type RawTypedResponseBody, type RequestContext, type ResolvedForklaunchAuthRequest, type ResolvedForklaunchRequest, type ResolvedForklaunchResponse, type ResolvedSessionObject, type ResponseBody, type ResponseCompiledSchema, type ResponseShape, type ResponsesObject, type RouterMap, type RoutingStrategy, type SchemaAuthMethods, type SdkHandler, type SdkRouter, type ServerSentEventBody, type SessionObject, type StatusCode, type StringOnlyObject, type TelemetryOptions, type TextBody, type ToFetchMap, type TypedBody, type TypedHandler, type TypedMiddlewareDefinition, type TypedNestableMiddlewareDefinition, type TypedRequestBody, type TypedResponseBody, type UnknownBody, type UnknownResponseBody, type UrlEncodedForm, type VersionSchema, type VersionedRequests, type VersionedResponses, createHmacToken, delete_, discriminateBody, discriminateResponseBodies, enrichExpressLikeSend, evaluateTelemetryOptions, generateMcpServer, generateOpenApiSpecs, get, getCodeForStatus, head, httpRequestsTotalCounter, httpServerDurationHistogram, isClientError, isForklaunchRequest, isForklaunchRouter, isInformational, isPortBound, isRedirection, isServerError, isSuccessful, isValidStatusCode, logger, meta, metricsDefinitions, middleware, options, patch, post, put, recordMetric, sdkClient, sdkRouter, trace, typedAuthHandler, typedHandler };
|
package/lib/http/index.d.ts
CHANGED
@@ -1960,36 +1960,6 @@ declare function discriminateResponseBodies<SV extends AnySchemaValidator>(schem
|
|
1960
1960
|
schema: SV["_ValidSchemaObject"];
|
1961
1961
|
}>;
|
1962
1962
|
|
1963
|
-
/**
|
1964
|
-
* Configuration options for SDK client creation.
|
1965
|
-
*/
|
1966
|
-
interface SdkClientOptions {
|
1967
|
-
/**
|
1968
|
-
* Enable performance optimizations for better autocomplete.
|
1969
|
-
* This may slightly change type inference behavior but improves IDE performance.
|
1970
|
-
* @default false
|
1971
|
-
*/
|
1972
|
-
optimizePerformance?: boolean;
|
1973
|
-
/**
|
1974
|
-
* Use lazy evaluation for SDK and fetch properties.
|
1975
|
-
* This defers computation until first access, improving initial load time.
|
1976
|
-
* @default false
|
1977
|
-
*/
|
1978
|
-
lazyEvaluation?: boolean;
|
1979
|
-
}
|
1980
|
-
/**
|
1981
|
-
* Optimized return type for better autocomplete performance.
|
1982
|
-
* Uses simpler type structures that TypeScript can process more efficiently.
|
1983
|
-
*/
|
1984
|
-
type OptimizedSdkClient<SV extends AnySchemaValidator, T extends RouterMap<SV>> = {
|
1985
|
-
readonly _finalizedSdk: true;
|
1986
|
-
readonly sdk: {
|
1987
|
-
[K in keyof T]: T[K] extends {
|
1988
|
-
sdk: infer S;
|
1989
|
-
} ? S : T[K] extends RouterMap<SV> ? OptimizedSdkClient<SV, T[K]>['sdk'] : never;
|
1990
|
-
};
|
1991
|
-
readonly fetch: FetchFunction<MapToFetch<SV, T>>;
|
1992
|
-
};
|
1993
1963
|
/**
|
1994
1964
|
* Creates a complete SDK client from a RouterMap configuration.
|
1995
1965
|
* This is the main entry point for creating type-safe SDK clients that combine
|
@@ -1999,7 +1969,6 @@ type OptimizedSdkClient<SV extends AnySchemaValidator, T extends RouterMap<SV>>
|
|
1999
1969
|
* @template T - The RouterMap type to create the SDK client from
|
2000
1970
|
* @param schemaValidator - The schema validator instance used for validation and type constraints
|
2001
1971
|
* @param routerMap - The router map containing the complete API configuration
|
2002
|
-
* @param options - Optional configuration for performance optimization
|
2003
1972
|
*
|
2004
1973
|
* @returns An object containing both the SDK interface and fetch function:
|
2005
1974
|
* - `sdk`: The extracted SDK interfaces for direct method calls
|
@@ -2027,19 +1996,13 @@ type OptimizedSdkClient<SV extends AnySchemaValidator, T extends RouterMap<SV>>
|
|
2027
1996
|
*
|
2028
1997
|
* // Use fetch function for custom requests
|
2029
1998
|
* const response = await client.fetch('getUser', { params: { id: '123' } });
|
2030
|
-
*
|
2031
|
-
* // For better autocomplete performance in large projects:
|
2032
|
-
* const optimizedClient = sdkClient(zodValidator, routerMap, { optimizePerformance: true });
|
2033
1999
|
* ```
|
2034
2000
|
*/
|
2035
|
-
declare function sdkClient<SV extends AnySchemaValidator, T extends RouterMap<SV>>(schemaValidator: SV, routerMap: T
|
2001
|
+
declare function sdkClient<SV extends AnySchemaValidator, T extends RouterMap<SV>>(schemaValidator: SV, routerMap: T): {
|
2036
2002
|
_finalizedSdk: true;
|
2037
2003
|
sdk: MapToSdk<SV, T>;
|
2038
2004
|
fetch: FetchFunction<MapToFetch<SV, T>>;
|
2039
2005
|
};
|
2040
|
-
declare function sdkClient<SV extends AnySchemaValidator, T extends RouterMap<SV>>(schemaValidator: SV, routerMap: T, options: SdkClientOptions & {
|
2041
|
-
optimizePerformance: true;
|
2042
|
-
}): OptimizedSdkClient<SV, T>;
|
2043
2006
|
|
2044
2007
|
/**
|
2045
2008
|
* Creates a type-safe SDK router by mapping controller definitions to router SDK functions.
|
@@ -2226,4 +2189,4 @@ declare function logger(level: LevelWithSilentOrString, meta?: AnyValueMap): Pin
|
|
2226
2189
|
|
2227
2190
|
declare function recordMetric<SV extends AnySchemaValidator, P extends ParamsDictionary, ReqBody extends Record<string, unknown>, ReqQuery extends ParsedQs, ResBodyMap extends Record<string, unknown>, ReqHeaders extends Record<string, string>, ResHeaders extends Record<string, unknown>, LocalsObj extends Record<string, unknown>, VersionedReqs extends VersionedRequests, SessionSchema extends Record<string, unknown>>(req: ForklaunchRequest<SV, P, ReqBody, ReqQuery, ReqHeaders, Extract<keyof VersionedReqs, string>, SessionSchema>, res: ForklaunchResponse<unknown, ResBodyMap, ResHeaders, LocalsObj, Extract<keyof VersionedReqs, string>>): void;
|
2228
2191
|
|
2229
|
-
export { ATTR_API_NAME, ATTR_CORRELATION_ID, type AuthMethods, type AuthMethodsBase, type BasicAuthMethods, type Body, type BodyObject, type ClusterConfig, type ConstrainedForklaunchRouter, type ContractDetails, type ContractDetailsExpressLikeSchemaHandler, type ContractDetailsOrMiddlewareOrTypedHandler, type DecodeResource, type DocsConfiguration, type ErrorContainer, type ExpressLikeApplicationOptions, type ExpressLikeAuthMapper, type ExpressLikeGlobalAuthOptions, type ExpressLikeHandler, type ExpressLikeRouter, type ExpressLikeRouterOptions, type ExpressLikeSchemaAuthMapper, type ExpressLikeSchemaGlobalAuthOptions, type ExpressLikeSchemaHandler, type ExpressLikeTypedHandler, type ExtractBody, type ExtractContentType, type ExtractLiveTypeFn, type ExtractResponseBody, type ExtractedParamsObject, type FetchFunction, type FileBody, type ForklaunchBaseRequest, ForklaunchExpressLikeApplication, ForklaunchExpressLikeRouter, type ForklaunchNextFunction, type ForklaunchRequest, type ForklaunchResErrors, type ForklaunchResHeaders, type ForklaunchResponse, type ForklaunchRoute, type ForklaunchRouter, type ForklaunchSendableData, type ForklaunchStatusResponse, HTTPStatuses, type HeadersObject, type HmacMethods, type HttpContractDetails, type HttpMethod, type JsonBody, type JwtAuthMethods, type LiveSdkFunction, type LiveTypeFunction, type LiveTypeFunctionRequestInit, type LiveTypeRouteDefinition, type LogFn, type LoggerMeta, type MapControllerToSdk, type MapParamsSchema, type MapReqBodySchema, type MapReqHeadersSchema, type MapReqQuerySchema, type MapResBodyMapSchema, type MapResHeadersSchema, type MapSchema, type MapSessionSchema, type MapToFetch, type MapToSdk, type MapVersionedReqsSchema, type MapVersionedRespsSchema, type Method, type MetricType, type MetricsDefinition, type MiddlewareContractDetails, type MiddlewareOrMiddlewareWithTypedHandler, type MultipartForm, type NestableRouterBasedHandler, type NumberOnlyObject, OPENAPI_DEFAULT_VERSION, OpenTelemetryCollector, type
|
2192
|
+
export { ATTR_API_NAME, ATTR_CORRELATION_ID, type AuthMethods, type AuthMethodsBase, type BasicAuthMethods, type Body, type BodyObject, type ClusterConfig, type ConstrainedForklaunchRouter, type ContractDetails, type ContractDetailsExpressLikeSchemaHandler, type ContractDetailsOrMiddlewareOrTypedHandler, type DecodeResource, type DocsConfiguration, type ErrorContainer, type ExpressLikeApplicationOptions, type ExpressLikeAuthMapper, type ExpressLikeGlobalAuthOptions, type ExpressLikeHandler, type ExpressLikeRouter, type ExpressLikeRouterOptions, type ExpressLikeSchemaAuthMapper, type ExpressLikeSchemaGlobalAuthOptions, type ExpressLikeSchemaHandler, type ExpressLikeTypedHandler, type ExtractBody, type ExtractContentType, type ExtractLiveTypeFn, type ExtractResponseBody, type ExtractedParamsObject, type FetchFunction, type FileBody, type ForklaunchBaseRequest, ForklaunchExpressLikeApplication, ForklaunchExpressLikeRouter, type ForklaunchNextFunction, type ForklaunchRequest, type ForklaunchResErrors, type ForklaunchResHeaders, type ForklaunchResponse, type ForklaunchRoute, type ForklaunchRouter, type ForklaunchSendableData, type ForklaunchStatusResponse, HTTPStatuses, type HeadersObject, type HmacMethods, type HttpContractDetails, type HttpMethod, type JsonBody, type JwtAuthMethods, type LiveSdkFunction, type LiveTypeFunction, type LiveTypeFunctionRequestInit, type LiveTypeRouteDefinition, type LogFn, type LoggerMeta, type MapControllerToSdk, type MapParamsSchema, type MapReqBodySchema, type MapReqHeadersSchema, type MapReqQuerySchema, type MapResBodyMapSchema, type MapResHeadersSchema, type MapSchema, type MapSessionSchema, type MapToFetch, type MapToSdk, type MapVersionedReqsSchema, type MapVersionedRespsSchema, type Method, type MetricType, type MetricsDefinition, type MiddlewareContractDetails, type MiddlewareOrMiddlewareWithTypedHandler, type MultipartForm, type NestableRouterBasedHandler, type NumberOnlyObject, OPENAPI_DEFAULT_VERSION, OpenTelemetryCollector, type ParamsDictionary, type ParamsObject, type PathBasedHandler, type PathMatch, type PathOrMiddlewareBasedHandler, type PathParamHttpContractDetails, type PathParamMethod, type QueryObject, type RawTypedResponseBody, type RequestContext, type ResolvedForklaunchAuthRequest, type ResolvedForklaunchRequest, type ResolvedForklaunchResponse, type ResolvedSessionObject, type ResponseBody, type ResponseCompiledSchema, type ResponseShape, type ResponsesObject, type RouterMap, type RoutingStrategy, type SchemaAuthMethods, type SdkHandler, type SdkRouter, type ServerSentEventBody, type SessionObject, type StatusCode, type StringOnlyObject, type TelemetryOptions, type TextBody, type ToFetchMap, type TypedBody, type TypedHandler, type TypedMiddlewareDefinition, type TypedNestableMiddlewareDefinition, type TypedRequestBody, type TypedResponseBody, type UnknownBody, type UnknownResponseBody, type UrlEncodedForm, type VersionSchema, type VersionedRequests, type VersionedResponses, createHmacToken, delete_, discriminateBody, discriminateResponseBodies, enrichExpressLikeSend, evaluateTelemetryOptions, generateMcpServer, generateOpenApiSpecs, get, getCodeForStatus, head, httpRequestsTotalCounter, httpServerDurationHistogram, isClientError, isForklaunchRequest, isForklaunchRouter, isInformational, isPortBound, isRedirection, isServerError, isSuccessful, isValidStatusCode, logger, meta, metricsDefinitions, middleware, options, patch, post, put, recordMetric, sdkClient, sdkRouter, trace, typedAuthHandler, typedHandler };
|
package/lib/http/index.js
CHANGED
@@ -3975,36 +3975,12 @@ function mapToFetch(schemaValidator, routerMap) {
|
|
3975
3975
|
return (version ? (0, import_common14.toRecord)((0, import_common14.toRecord)(flattenedFetchMap[path])[method ?? "GET"])[version] : (0, import_common14.toRecord)(flattenedFetchMap[path])[method ?? "GET"])(path, reqInit[0]);
|
3976
3976
|
});
|
3977
3977
|
}
|
3978
|
-
function sdkClient(schemaValidator, routerMap
|
3979
|
-
|
3980
|
-
let _sdk;
|
3981
|
-
let _fetch;
|
3982
|
-
const lazyClient = {
|
3983
|
-
_finalizedSdk: true,
|
3984
|
-
get sdk() {
|
3985
|
-
if (!_sdk) {
|
3986
|
-
_sdk = mapToSdk(schemaValidator, routerMap);
|
3987
|
-
}
|
3988
|
-
return _sdk;
|
3989
|
-
},
|
3990
|
-
get fetch() {
|
3991
|
-
if (!_fetch) {
|
3992
|
-
_fetch = mapToFetch(schemaValidator, routerMap);
|
3993
|
-
}
|
3994
|
-
return _fetch;
|
3995
|
-
}
|
3996
|
-
};
|
3997
|
-
return lazyClient;
|
3998
|
-
}
|
3999
|
-
const client = {
|
3978
|
+
function sdkClient(schemaValidator, routerMap) {
|
3979
|
+
return {
|
4000
3980
|
_finalizedSdk: true,
|
4001
3981
|
sdk: mapToSdk(schemaValidator, routerMap),
|
4002
3982
|
fetch: mapToFetch(schemaValidator, routerMap)
|
4003
3983
|
};
|
4004
|
-
if (options2?.optimizePerformance) {
|
4005
|
-
return client;
|
4006
|
-
}
|
4007
|
-
return client;
|
4008
3984
|
}
|
4009
3985
|
|
4010
3986
|
// src/http/sdk/sdkRouter.ts
|