@readyfor/api-client-base 0.245.1 → 0.245.2
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/apiClientConfigStore.d.mts +1 -1
- package/dist/apiClientConfigStore.mjs +2 -2
- package/dist/apiError.mjs +1 -1
- package/dist/fetcher.mjs +3 -3
- package/dist/index.d.mts +8 -8
- package/dist/index.mjs +8 -8
- package/dist/react/ApiClientConfigProvider.d.mts +2 -2
- package/dist/react/ApiClientConfigProvider.js +1 -1
- package/dist/react/ApiClientConfigProvider.mjs +2 -2
- package/dist/react/index.d.mts +5 -5
- package/dist/react/index.mjs +3 -3
- package/dist/react/useApiClientConfig.d.mts +2 -2
- package/dist/react/useApiClientConfig.js +2 -2
- package/dist/react/useApiClientConfig.mjs +2 -2
- package/dist/requestUrl.mjs +1 -1
- package/dist/utils/requestInit.mjs +1 -1
- package/package.json +4 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createStore } from "./store";
|
|
2
|
-
import { mergeRequestInit } from "./utils/requestInit";
|
|
1
|
+
import { createStore } from "./store.js";
|
|
2
|
+
import { mergeRequestInit } from "./utils/requestInit.js";
|
|
3
3
|
const defaultConfig = {};
|
|
4
4
|
const store = createStore(defaultConfig);
|
|
5
5
|
const setApiClientConfig = (config) => store.setState(() => config);
|
package/dist/apiError.mjs
CHANGED
package/dist/fetcher.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { errorStatusCode, HTTPError } from "./apiError";
|
|
2
|
-
import { store } from "./apiClientConfigStore";
|
|
3
|
-
import { mergeRequestInit } from "./utils/requestInit";
|
|
1
|
+
import { errorStatusCode, HTTPError } from "./apiError.js";
|
|
2
|
+
import { store } from "./apiClientConfigStore.js";
|
|
3
|
+
import { mergeRequestInit } from "./utils/requestInit.js";
|
|
4
4
|
const defaultRequestInit = {
|
|
5
5
|
credentials: "include"
|
|
6
6
|
};
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { Config, RequestConfig, buildRequestInitWithDefaultConfig, setApiClientConfig, store } from './apiClientConfigStore.
|
|
2
|
-
export { ErrorStatusCode, HTTPError, errorStatusCode, errorTitle, getErrorStatus } from './apiError.
|
|
3
|
-
export { BlobFetcherResponse, createBlobFetcher, createJsonFetcher, createTextFetcher, createVoidFetcher } from './fetcher.
|
|
4
|
-
export { __internal__requestUrl } from './requestUrl.
|
|
5
|
-
export { Store, createStore } from './store.
|
|
6
|
-
export { ForceDig, QueryPropsFor } from './types.
|
|
7
|
-
export { isZodError, schemaForType } from './zod.
|
|
8
|
-
export { mergeRequestInit } from './utils/requestInit.
|
|
1
|
+
export { Config, RequestConfig, buildRequestInitWithDefaultConfig, setApiClientConfig, store } from './apiClientConfigStore.js';
|
|
2
|
+
export { ErrorStatusCode, HTTPError, errorStatusCode, errorTitle, getErrorStatus } from './apiError.js';
|
|
3
|
+
export { BlobFetcherResponse, createBlobFetcher, createJsonFetcher, createTextFetcher, createVoidFetcher } from './fetcher.js';
|
|
4
|
+
export { __internal__requestUrl } from './requestUrl.js';
|
|
5
|
+
export { Store, createStore } from './store.js';
|
|
6
|
+
export { ForceDig, QueryPropsFor } from './types.js';
|
|
7
|
+
export { isZodError, schemaForType } from './zod.js';
|
|
8
|
+
export { mergeRequestInit } from './utils/requestInit.js';
|
|
9
9
|
import 'zod';
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from "./apiClientConfigStore";
|
|
2
|
-
export * from "./apiError";
|
|
3
|
-
export * from "./fetcher";
|
|
4
|
-
export * from "./requestUrl";
|
|
5
|
-
export * from "./store";
|
|
6
|
-
export * from "./types";
|
|
7
|
-
export * from "./zod";
|
|
8
|
-
export * from "./utils/requestInit";
|
|
1
|
+
export * from "./apiClientConfigStore.js";
|
|
2
|
+
export * from "./apiError.js";
|
|
3
|
+
export * from "./fetcher.js";
|
|
4
|
+
export * from "./requestUrl.js";
|
|
5
|
+
export * from "./store.js";
|
|
6
|
+
export * from "./types.js";
|
|
7
|
+
export * from "./zod.js";
|
|
8
|
+
export * from "./utils/requestInit.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
|
-
import { Config } from '../apiClientConfigStore.
|
|
3
|
-
import { Store } from '../store.
|
|
2
|
+
import { Config } from '../apiClientConfigStore.js';
|
|
3
|
+
import { Store } from '../store.js';
|
|
4
4
|
import { SWRConfiguration } from 'swr';
|
|
5
5
|
|
|
6
6
|
type Configuration = Config & {
|
|
@@ -24,7 +24,7 @@ __export(ApiClientConfigProvider_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(ApiClientConfigProvider_exports);
|
|
25
25
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
26
|
var import_react = require("react");
|
|
27
|
-
var import_apiClientConfigStore = require("
|
|
27
|
+
var import_apiClientConfigStore = require("../apiClientConfigStore");
|
|
28
28
|
var import_swr = require("swr");
|
|
29
29
|
var import_swr2 = require("./swr");
|
|
30
30
|
const ApiClientConfigContext = (0, import_react.createContext)(import_apiClientConfigStore.store);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { createContext, useContext, useEffect } from "react";
|
|
3
|
-
import { store } from "
|
|
3
|
+
import { store } from "../apiClientConfigStore.js";
|
|
4
4
|
import { SWRConfig } from "swr";
|
|
5
|
-
import { createSwrConfig } from "./swr";
|
|
5
|
+
import { createSwrConfig } from "./swr.js";
|
|
6
6
|
const ApiClientConfigContext = createContext(store);
|
|
7
7
|
const ApiClientConfigProvider = (props) => {
|
|
8
8
|
const { swr, ...config } = props.config;
|
package/dist/react/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { ApiClientConfigProvider, useApiClientConfigContext } from './ApiClientConfigProvider.
|
|
2
|
-
export { Configuration, createSwrConfig } from './swr.
|
|
3
|
-
export { useApiClientConfig, useApiClientConfigWithSelector, useRequestInit } from './useApiClientConfig.
|
|
1
|
+
export { ApiClientConfigProvider, useApiClientConfigContext } from './ApiClientConfigProvider.js';
|
|
2
|
+
export { Configuration, createSwrConfig } from './swr.js';
|
|
3
|
+
export { useApiClientConfig, useApiClientConfigWithSelector, useRequestInit } from './useApiClientConfig.js';
|
|
4
4
|
import 'react';
|
|
5
|
-
import '../apiClientConfigStore.
|
|
6
|
-
import '../store.
|
|
5
|
+
import '../apiClientConfigStore.js';
|
|
6
|
+
import '../store.js';
|
|
7
7
|
import 'swr';
|
package/dist/react/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./ApiClientConfigProvider";
|
|
2
|
-
export * from "./swr";
|
|
3
|
-
export * from "./useApiClientConfig";
|
|
1
|
+
export * from "./ApiClientConfigProvider.js";
|
|
2
|
+
export * from "./swr.js";
|
|
3
|
+
export * from "./useApiClientConfig.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Config } from '../apiClientConfigStore.
|
|
2
|
-
import '../store.
|
|
1
|
+
import { Config } from '../apiClientConfigStore.js';
|
|
2
|
+
import '../store.js';
|
|
3
3
|
|
|
4
4
|
declare const useApiClientConfig: () => Config;
|
|
5
5
|
declare const useApiClientConfigWithSelector: <T>(selector: (state: Config) => T) => T;
|
|
@@ -23,9 +23,9 @@ __export(useApiClientConfig_exports, {
|
|
|
23
23
|
useRequestInit: () => useRequestInit
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(useApiClientConfig_exports);
|
|
26
|
-
var import_ApiClientConfigProvider = require("
|
|
26
|
+
var import_ApiClientConfigProvider = require("./ApiClientConfigProvider");
|
|
27
27
|
var import_react = require("react");
|
|
28
|
-
var import_requestInit = require("
|
|
28
|
+
var import_requestInit = require("../utils/requestInit");
|
|
29
29
|
var import_shim = require("use-sync-external-store/shim/index.js");
|
|
30
30
|
var import_with_selector = require("use-sync-external-store/shim/with-selector.js");
|
|
31
31
|
const useApiClientConfig = () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useApiClientConfigContext } from "
|
|
1
|
+
import { useApiClientConfigContext } from "./ApiClientConfigProvider.js";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
|
-
import { mergeRequestInit } from "
|
|
3
|
+
import { mergeRequestInit } from "../utils/requestInit.js";
|
|
4
4
|
import { useSyncExternalStore } from "use-sync-external-store/shim/index.js";
|
|
5
5
|
import { useSyncExternalStoreWithSelector } from "use-sync-external-store/shim/with-selector.js";
|
|
6
6
|
const useApiClientConfig = () => {
|
package/dist/requestUrl.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@readyfor/api-client-base",
|
|
3
|
-
"version": "0.245.
|
|
3
|
+
"version": "0.245.2",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
|
-
"build": "tsup"
|
|
31
|
+
"build": "tsup && resolve-tspaths"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"qs": "6.14.0",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"@types/react": "19.1.2",
|
|
40
40
|
"@types/use-sync-external-store": "1.5.0",
|
|
41
41
|
"react": "catalog:react19",
|
|
42
|
+
"resolve-tspaths": "^0.8.23",
|
|
42
43
|
"swr": "catalog:",
|
|
43
44
|
"use-sync-external-store": "catalog:use-sync-external-store"
|
|
44
45
|
},
|
|
@@ -74,5 +75,5 @@
|
|
|
74
75
|
"!src/**/*.test.tsx"
|
|
75
76
|
]
|
|
76
77
|
},
|
|
77
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "973fcb574a7708089cd04c9303ff3deb7b32a954"
|
|
78
79
|
}
|