@fumadocs/cli 0.0.4 → 0.0.5

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.
Files changed (2) hide show
  1. package/dist/index.js +9 -8
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -619,7 +619,7 @@ function runTransform(sourceFile) {
619
619
  if (parent) {
620
620
  const inner = parent.getJsxChildren().map((v) => v.getFullText()).filter((v) => v.length > 0).join("\n");
621
621
  parent.setBodyText(
622
- `<I18nProvider locale={params.lang} locales={[
622
+ `<I18nProvider locale={(await params).lang} locales={[
623
623
  { locale: 'en', name: 'English' }
624
624
  ]}>
625
625
  ${inner.trim()}
@@ -632,8 +632,9 @@ function runTransform(sourceFile) {
632
632
  });
633
633
  }
634
634
  const func = sourceFile.getDescendantsOfKind(SyntaxKind3.FunctionDeclaration).find((v) => v.isDefaultExport());
635
+ func?.toggleModifier("async", true);
635
636
  const param = func?.getParameters().at(0);
636
- param?.setType(`{ params: { lang: string }, children: ReactNode }`);
637
+ param?.setType(`{ params: Promise<{ lang: string }>, children: ReactNode }`);
637
638
  param?.set({
638
639
  name: `{ params, children }`
639
640
  });
@@ -894,7 +895,7 @@ async function runTree(args) {
894
895
  // package.json
895
896
  var package_default = {
896
897
  name: "@fumadocs/cli",
897
- version: "0.0.4",
898
+ version: "0.0.5",
898
899
  description: "The CLI tool for Fumadocs",
899
900
  keywords: [
900
901
  "NextJs",
@@ -928,17 +929,17 @@ var package_default = {
928
929
  "types:check": "tsc --noEmit"
929
930
  },
930
931
  dependencies: {
931
- "@clack/prompts": "^0.8.2",
932
+ "@clack/prompts": "^0.9.0",
932
933
  commander: "^12.1.0",
933
- execa: "^9.5.1",
934
- "package-manager-detector": "^0.2.4",
934
+ execa: "^9.5.2",
935
+ "package-manager-detector": "^0.2.8",
935
936
  picocolors: "^1.1.1",
936
937
  "ts-morph": "^24.0.0"
937
938
  },
938
939
  devDependencies: {
939
940
  "@types/cross-spawn": "^6.0.6",
940
- "@types/node": "22.9.3",
941
- "@types/react": "^18.3.12",
941
+ "@types/node": "22.10.2",
942
+ "@types/react": "^19.0.2",
942
943
  "eslint-config-custom": "workspace:*",
943
944
  "fast-glob": "^3.3.1",
944
945
  tsconfig: "workspace:*",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fumadocs/cli",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "The CLI tool for Fumadocs",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -26,17 +26,17 @@
26
26
  "dist/*"
27
27
  ],
28
28
  "dependencies": {
29
- "@clack/prompts": "^0.8.2",
29
+ "@clack/prompts": "^0.9.0",
30
30
  "commander": "^12.1.0",
31
- "execa": "^9.5.1",
32
- "package-manager-detector": "^0.2.4",
31
+ "execa": "^9.5.2",
32
+ "package-manager-detector": "^0.2.8",
33
33
  "picocolors": "^1.1.1",
34
34
  "ts-morph": "^24.0.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/cross-spawn": "^6.0.6",
38
- "@types/node": "22.9.3",
39
- "@types/react": "^18.3.12",
38
+ "@types/node": "22.10.2",
39
+ "@types/react": "^19.0.2",
40
40
  "fast-glob": "^3.3.1",
41
41
  "tsx": "^4.19.2",
42
42
  "eslint-config-custom": "0.0.0",