@fumadocs/cli 0.0.5 → 0.0.7
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.js +29 -22
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -256,6 +256,9 @@ prettier . --write`,
|
|
|
256
256
|
if (text.type === "code") {
|
|
257
257
|
note(text.code, text.title);
|
|
258
258
|
}
|
|
259
|
+
if (text.type === "title") {
|
|
260
|
+
log.step(text.text);
|
|
261
|
+
}
|
|
259
262
|
}
|
|
260
263
|
}
|
|
261
264
|
|
|
@@ -473,7 +476,6 @@ export function generateMetadata({ params }: { params: { slug?: string[] } }) {
|
|
|
473
476
|
|
|
474
477
|
// src/plugins/i18n.ts
|
|
475
478
|
import path7 from "node:path";
|
|
476
|
-
import picocolors4 from "picocolors";
|
|
477
479
|
import { log as log3 } from "@clack/prompts";
|
|
478
480
|
|
|
479
481
|
// src/utils/i18n/transform-layout-config.ts
|
|
@@ -641,6 +643,7 @@ function runTransform(sourceFile) {
|
|
|
641
643
|
}
|
|
642
644
|
|
|
643
645
|
// src/plugins/i18n.ts
|
|
646
|
+
import picocolors4 from "picocolors";
|
|
644
647
|
var i18nPlugin = {
|
|
645
648
|
files: ({ src: src2 }) => ({
|
|
646
649
|
"lib/i18n.ts": generated["lib/i18n"],
|
|
@@ -649,34 +652,38 @@ var i18nPlugin = {
|
|
|
649
652
|
dependencies: [],
|
|
650
653
|
instructions: () => [
|
|
651
654
|
{
|
|
652
|
-
type: "
|
|
653
|
-
text:
|
|
655
|
+
type: "title",
|
|
656
|
+
text: `1. Update the params of ${picocolors4.bold("page.tsx")} and ${picocolors4.bold("layout.tsx")}, and make them async if necessary.`
|
|
654
657
|
},
|
|
655
658
|
{
|
|
656
659
|
type: "code",
|
|
657
|
-
title: "
|
|
660
|
+
title: "layout.tsx",
|
|
658
661
|
code: `
|
|
659
|
-
export default function
|
|
662
|
+
export default async function Layout({
|
|
660
663
|
params,
|
|
661
664
|
}: {
|
|
662
|
-
${picocolors4.underline(picocolors4.bold("params: { lang: string
|
|
665
|
+
${picocolors4.underline(picocolors4.bold("params: Promise<{ lang: string }>"))}
|
|
663
666
|
})
|
|
664
667
|
`.trim()
|
|
665
668
|
},
|
|
666
|
-
{
|
|
667
|
-
type: "text",
|
|
668
|
-
text: "Update the usages to `source` with:"
|
|
669
|
-
},
|
|
670
669
|
{
|
|
671
670
|
type: "code",
|
|
672
671
|
title: "page.tsx",
|
|
673
|
-
code: `
|
|
674
|
-
|
|
672
|
+
code: `
|
|
673
|
+
export default async function Page({
|
|
674
|
+
params,
|
|
675
|
+
}: {
|
|
676
|
+
${picocolors4.underline(picocolors4.bold("params: Promise<{ lang: string; slug?: string[] }>"))}
|
|
677
|
+
})
|
|
678
|
+
`.trim()
|
|
675
679
|
},
|
|
676
680
|
{
|
|
677
|
-
type: "
|
|
678
|
-
|
|
679
|
-
|
|
681
|
+
type: "title",
|
|
682
|
+
text: "2. Update references to your `source` object"
|
|
683
|
+
},
|
|
684
|
+
{
|
|
685
|
+
type: "text",
|
|
686
|
+
text: "You can follow the instructions in https://fumadocs.vercel.app/docs/ui/internationalization#source section."
|
|
680
687
|
}
|
|
681
688
|
],
|
|
682
689
|
async transform(ctx) {
|
|
@@ -895,7 +902,7 @@ async function runTree(args) {
|
|
|
895
902
|
// package.json
|
|
896
903
|
var package_default = {
|
|
897
904
|
name: "@fumadocs/cli",
|
|
898
|
-
version: "0.0.
|
|
905
|
+
version: "0.0.7",
|
|
899
906
|
description: "The CLI tool for Fumadocs",
|
|
900
907
|
keywords: [
|
|
901
908
|
"NextJs",
|
|
@@ -929,19 +936,19 @@ var package_default = {
|
|
|
929
936
|
"types:check": "tsc --noEmit"
|
|
930
937
|
},
|
|
931
938
|
dependencies: {
|
|
932
|
-
"@clack/prompts": "^0.9.
|
|
933
|
-
commander: "^
|
|
939
|
+
"@clack/prompts": "^0.9.1",
|
|
940
|
+
commander: "^13.0.0",
|
|
934
941
|
execa: "^9.5.2",
|
|
935
942
|
"package-manager-detector": "^0.2.8",
|
|
936
943
|
picocolors: "^1.1.1",
|
|
937
|
-
"ts-morph": "^
|
|
944
|
+
"ts-morph": "^25.0.0"
|
|
938
945
|
},
|
|
939
946
|
devDependencies: {
|
|
940
947
|
"@types/cross-spawn": "^6.0.6",
|
|
941
|
-
"@types/node": "22.10.
|
|
942
|
-
"@types/react": "^19.0.
|
|
948
|
+
"@types/node": "22.10.6",
|
|
949
|
+
"@types/react": "^19.0.7",
|
|
943
950
|
"eslint-config-custom": "workspace:*",
|
|
944
|
-
"fast-glob": "^3.3.
|
|
951
|
+
"fast-glob": "^3.3.3",
|
|
945
952
|
tsconfig: "workspace:*",
|
|
946
953
|
tsx: "^4.19.2"
|
|
947
954
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fumadocs/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "The CLI tool for Fumadocs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -26,18 +26,18 @@
|
|
|
26
26
|
"dist/*"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@clack/prompts": "^0.9.
|
|
30
|
-
"commander": "^
|
|
29
|
+
"@clack/prompts": "^0.9.1",
|
|
30
|
+
"commander": "^13.0.0",
|
|
31
31
|
"execa": "^9.5.2",
|
|
32
32
|
"package-manager-detector": "^0.2.8",
|
|
33
33
|
"picocolors": "^1.1.1",
|
|
34
|
-
"ts-morph": "^
|
|
34
|
+
"ts-morph": "^25.0.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/cross-spawn": "^6.0.6",
|
|
38
|
-
"@types/node": "22.10.
|
|
39
|
-
"@types/react": "^19.0.
|
|
40
|
-
"fast-glob": "^3.3.
|
|
38
|
+
"@types/node": "22.10.6",
|
|
39
|
+
"@types/react": "^19.0.7",
|
|
40
|
+
"fast-glob": "^3.3.3",
|
|
41
41
|
"tsx": "^4.19.2",
|
|
42
42
|
"eslint-config-custom": "0.0.0",
|
|
43
43
|
"tsconfig": "0.0.0"
|