akanjs 2.2.3-rc.1 → 2.2.3

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/common/types.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export interface FetchPolicy<Returns = unknown> {
2
2
  cache?: boolean | number;
3
3
  crystalize?: boolean;
4
- url?: string;
4
+ origin?: string;
5
5
  onError?: (error: string) => void;
6
6
  token?: string;
7
7
  partial?: string[];
@@ -142,7 +142,7 @@ export class FetchClient {
142
142
  const argMap = new Map(serializerMap.entries().map(([key, serializer], idx) => [key, serializer(args[idx])]));
143
143
  const url = FetchClient.makeHttpUrl(key, endpoint, prefix, argMap);
144
144
  const headers = this.#makeAuthHeaders(option);
145
- const baseUrl = option?.url;
145
+ const baseUrl = option?.origin;
146
146
 
147
147
  const requestQuery = () => this.http.get(url, { headers, baseUrl });
148
148
  const response = baseUrl
@@ -162,7 +162,7 @@ export class FetchClient {
162
162
  const body = HttpClient.makeBody(bodyArgs, uploadArgs, argMap);
163
163
  const response = await this.http.post(url, body, {
164
164
  headers: this.#makeAuthHeaders(option),
165
- baseUrl: option?.url,
165
+ baseUrl: option?.origin,
166
166
  });
167
167
  const parsedReturn = parseReturn(response, { crystalize: option?.crystalize ?? true });
168
168
  return parsedReturn;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akanjs",
3
- "version": "2.2.3-rc.1",
3
+ "version": "2.2.3",
4
4
  "sourceType": "module",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -1,7 +1,7 @@
1
1
  export interface FetchPolicy<Returns = unknown> {
2
2
  cache?: boolean | number;
3
3
  crystalize?: boolean;
4
- url?: string;
4
+ origin?: string;
5
5
  onError?: (error: string) => void;
6
6
  token?: string;
7
7
  partial?: string[];
@@ -63,10 +63,7 @@ export function toManifestJson(value: unknown): unknown {
63
63
  return Object.fromEntries(
64
64
  Object.entries(value)
65
65
  .filter(([, entryValue]) => entryValue !== undefined)
66
- .map(([key, entryValue]) => [
67
- camelToSnake(key),
68
- toManifestJson(entryValue),
69
- ]),
66
+ .map(([key, entryValue]) => [camelToSnake(key), toManifestJson(entryValue)]),
70
67
  );
71
68
  }
72
69
 
package/ui/System/SSR.tsx CHANGED
@@ -45,8 +45,7 @@ const SSRProvider = ({
45
45
  <Load.Page
46
46
  of={of}
47
47
  loader={async () => {
48
- if (!router.isInitialized)
49
- router.init({ type: "ssr", side: "server", lang: activeLocale, prefix });
48
+ if (!router.isInitialized) router.init({ type: "ssr", side: "server", lang: activeLocale, prefix });
50
49
  return { lang: activeLocale } as const;
51
50
  }}
52
51
  render={({ lang }) => (