@akanjs/cli 2.2.0-rc.0 → 2.2.0-rc.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/incrementalBuilder.proc.js +6 -0
- package/index.js +6 -0
- package/package.json +2 -2
|
@@ -4608,6 +4608,11 @@ import { loadFonts } from "akanjs/client";
|
|
|
4608
4608
|
import { System } from "akanjs/ui";
|
|
4609
4609
|
import { env } from "@apps/${opts.appName}/env/env.client";
|
|
4610
4610
|
${clientImport}${inheritedImport}${userImport}
|
|
4611
|
+
// SSR builds (target=bun) load the full dictionary server-side and pass only the active locale to the client.
|
|
4612
|
+
// CSR builds (target=browser) fold this branch to undefined, so the macro-seeded dictionary is used and the
|
|
4613
|
+
// server-only dict module (which pulls @libs/*/server) is dead-code-eliminated out of the browser bundle.
|
|
4614
|
+
const getActiveLocaleDictionary =
|
|
4615
|
+
process.env.AKAN_PUBLIC_RENDER_ENV === "ssr" ? (await import("@apps/${opts.appName}/lib/dict")).getDictionary : undefined;
|
|
4611
4616
|
const userFonts = userLayout.fonts ?? inheritedLayout.fonts ?? [];
|
|
4612
4617
|
const defaultFonts = userFonts.filter((font) => font.default);
|
|
4613
4618
|
if (defaultFonts.length > 1) throw new Error("[route-convention] only one default font is allowed per root layout");
|
|
@@ -4639,6 +4644,7 @@ export default function GeneratedLayout({ children, params, searchParams }: Layo
|
|
|
4639
4644
|
gaTrackingId={userLayout.gaTrackingId ?? inheritedLayout.gaTrackingId}
|
|
4640
4645
|
layoutStyle={userLayout.layoutStyle ?? inheritedLayout.layoutStyle}
|
|
4641
4646
|
reconnect={userLayout.reconnect ?? inheritedLayout.reconnect ?? false}
|
|
4647
|
+
dictionary={getActiveLocaleDictionary ? getActiveLocaleDictionary(params.lang) : undefined}
|
|
4642
4648
|
>
|
|
4643
4649
|
<UserLayout params={params} searchParams={searchParams}>{children}</UserLayout>
|
|
4644
4650
|
</System.Provider>
|
package/index.js
CHANGED
|
@@ -4606,6 +4606,11 @@ import { loadFonts } from "akanjs/client";
|
|
|
4606
4606
|
import { System } from "akanjs/ui";
|
|
4607
4607
|
import { env } from "@apps/${opts.appName}/env/env.client";
|
|
4608
4608
|
${clientImport}${inheritedImport}${userImport}
|
|
4609
|
+
// SSR builds (target=bun) load the full dictionary server-side and pass only the active locale to the client.
|
|
4610
|
+
// CSR builds (target=browser) fold this branch to undefined, so the macro-seeded dictionary is used and the
|
|
4611
|
+
// server-only dict module (which pulls @libs/*/server) is dead-code-eliminated out of the browser bundle.
|
|
4612
|
+
const getActiveLocaleDictionary =
|
|
4613
|
+
process.env.AKAN_PUBLIC_RENDER_ENV === "ssr" ? (await import("@apps/${opts.appName}/lib/dict")).getDictionary : undefined;
|
|
4609
4614
|
const userFonts = userLayout.fonts ?? inheritedLayout.fonts ?? [];
|
|
4610
4615
|
const defaultFonts = userFonts.filter((font) => font.default);
|
|
4611
4616
|
if (defaultFonts.length > 1) throw new Error("[route-convention] only one default font is allowed per root layout");
|
|
@@ -4637,6 +4642,7 @@ export default function GeneratedLayout({ children, params, searchParams }: Layo
|
|
|
4637
4642
|
gaTrackingId={userLayout.gaTrackingId ?? inheritedLayout.gaTrackingId}
|
|
4638
4643
|
layoutStyle={userLayout.layoutStyle ?? inheritedLayout.layoutStyle}
|
|
4639
4644
|
reconnect={userLayout.reconnect ?? inheritedLayout.reconnect ?? false}
|
|
4645
|
+
dictionary={getActiveLocaleDictionary ? getActiveLocaleDictionary(params.lang) : undefined}
|
|
4640
4646
|
>
|
|
4641
4647
|
<UserLayout params={params} searchParams={searchParams}>{children}</UserLayout>
|
|
4642
4648
|
</System.Provider>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akanjs/cli",
|
|
3
|
-
"version": "2.2.0-rc.
|
|
3
|
+
"version": "2.2.0-rc.2",
|
|
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.2.0-rc.
|
|
38
|
+
"akanjs": "2.2.0-rc.2",
|
|
39
39
|
"chalk": "^5.6.2",
|
|
40
40
|
"commander": "^14.0.3",
|
|
41
41
|
"daisyui": "^5.5.20",
|