@akanjs/cli 2.3.5-rc.2 → 2.3.5-rc.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/cli",
3
- "version": "2.3.5-rc.2",
3
+ "version": "2.3.5-rc.4",
4
4
  "sourceType": "module",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -35,7 +35,7 @@
35
35
  "@langchain/openai": "^1.4.6",
36
36
  "@tailwindcss/node": "^4.3.0",
37
37
  "@trapezedev/project": "^7.1.4",
38
- "akanjs": "2.3.5-rc.2",
38
+ "akanjs": "2.3.5-rc.4",
39
39
  "chalk": "^5.6.2",
40
40
  "commander": "^14.0.3",
41
41
  "daisyui": "^5.5.20",
@@ -18,7 +18,7 @@ export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: { [
18
18
  );
19
19
 
20
20
  return `
21
- import { FetchClient } from "akanjs/fetch";
21
+ import { FetchClient, type FetchClientType } from "akanjs/fetch";
22
22
  import { SignalRegistry, serverSignal${libs.length === 0 ? ", fetch as base" : ""} } from "akanjs/signal";
23
23
  ${libs.map((lib) => `import { fetch as ${lib} } from "@libs/${lib}/server";`).join("\n")}
24
24
 
@@ -60,10 +60,10 @@ ${serviceModules.map((module) => `export const ${module} = SignalRegistry.regist
60
60
 
61
61
  export const fetchSignals = [${signalNames.join(", ")}] as const;
62
62
  ${fetchSignalChunks
63
- .map((chunk, idx) => `const fetch${idx} = FetchClient.from(${chunk.join(", ")});`)
63
+ .map((chunk, idx) => `type Fetch${idx} = FetchClientType<readonly [${chunk.map((signal) => `typeof ${signal}`).join(", ")}]>;`)
64
64
  .join("\n")}
65
- export type Fetch = ${fetchSignalChunks.map((_, idx) => `typeof fetch${idx}`).join(" & ")};
66
- export const fetch: Fetch = FetchClient.from(${fetchSignalChunks.map((_, idx) => `fetch${idx}`).join(", ")}) as Fetch;
65
+ export type Fetch = ${fetchSignalChunks.map((_, idx) => `Fetch${idx}`).join(" & ")};
66
+ export const fetch: Fetch = (FetchClient.from as (...signals: unknown[]) => unknown)(...fetchSignals) as Fetch;
67
67
 
68
68
  export const getSerializedSignal = () => fetch.serializedSignal
69
69
  `;