@defjs/core 0.0.0-test-0002 → 0.0.0-test-0003
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/dist/index.d.ts +4 -0
- package/dist/index.js +13 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -250,5 +250,9 @@ export type Client = {} & {
|
|
|
250
250
|
};
|
|
251
251
|
export declare function isClient(value: unknown): value is Client;
|
|
252
252
|
export declare function createClient(options: ClientOptions): Client;
|
|
253
|
+
export declare function getGlobalClient(): Client;
|
|
254
|
+
export declare function setGlobalClient(client: Client): void;
|
|
255
|
+
export declare function restGlobalClient(): void;
|
|
256
|
+
export declare function createGlobalClient(options: ClientOptions): void;
|
|
253
257
|
|
|
254
258
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -553,9 +553,20 @@ function getGlobalClient() {
|
|
|
553
553
|
}
|
|
554
554
|
return globalClient;
|
|
555
555
|
}
|
|
556
|
+
function setGlobalClient(client2) {
|
|
557
|
+
globalClient = client2;
|
|
558
|
+
}
|
|
559
|
+
function restGlobalClient() {
|
|
560
|
+
globalClient = undefined;
|
|
561
|
+
}
|
|
562
|
+
function createGlobalClient(options) {
|
|
563
|
+
globalClient = createClient(options);
|
|
564
|
+
}
|
|
556
565
|
var CLIENT = Symbol("Client");
|
|
557
566
|
var globalClient;
|
|
558
567
|
export {
|
|
568
|
+
setGlobalClient,
|
|
569
|
+
restGlobalClient,
|
|
559
570
|
makeResponse,
|
|
560
571
|
makeHttpContextToken,
|
|
561
572
|
makeHttpContext,
|
|
@@ -563,9 +574,11 @@ export {
|
|
|
563
574
|
isFieldGroup,
|
|
564
575
|
isField,
|
|
565
576
|
isClient,
|
|
577
|
+
getGlobalClient,
|
|
566
578
|
field,
|
|
567
579
|
fetchHandler,
|
|
568
580
|
doRequest,
|
|
569
581
|
defineRequest,
|
|
582
|
+
createGlobalClient,
|
|
570
583
|
createClient
|
|
571
584
|
};
|