@fumadocs/cli 1.2.4 → 1.2.6

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.
@@ -0,0 +1,4 @@
1
+ import "../../ast-BRNdmLn5.js";
2
+ import "../../client-YTcWP1iz.js";
3
+ import { t as ComponentInstaller } from "../../installer-DQzu7o9x.js";
4
+ export { ComponentInstaller };
@@ -0,0 +1,2 @@
1
+ import { a as DownloadedRegistryInfo, c as componentSchema, d as indexSchema, f as namespaces, i as Component, l as fileSchema, n as CompiledFile, o as File, p as registryInfoSchema, r as CompiledRegistryInfo, s as NamespaceType, t as CompiledComponent, u as httpSubComponent } from "../schema-DADC22m_.js";
2
+ export { CompiledComponent, CompiledFile, CompiledRegistryInfo, Component, DownloadedRegistryInfo, File, NamespaceType, componentSchema, fileSchema, httpSubComponent, indexSchema, namespaces, registryInfoSchema };
@@ -0,0 +1,48 @@
1
+ import { z } from "zod";
2
+ //#region src/registry/schema.ts
3
+ const namespaces = [
4
+ "components",
5
+ "lib",
6
+ "css",
7
+ "route",
8
+ "ui",
9
+ "block"
10
+ ];
11
+ const indexSchema = z.object({
12
+ name: z.string(),
13
+ title: z.string().optional(),
14
+ description: z.string().optional()
15
+ });
16
+ const fileSchema = z.object({
17
+ type: z.literal(namespaces),
18
+ path: z.string(),
19
+ target: z.string().optional(),
20
+ content: z.string()
21
+ });
22
+ const httpSubComponent = z.object({
23
+ type: z.literal("http"),
24
+ baseUrl: z.string(),
25
+ component: z.string()
26
+ });
27
+ const componentSchema = z.object({
28
+ name: z.string(),
29
+ title: z.string().optional(),
30
+ description: z.string().optional(),
31
+ files: z.array(fileSchema),
32
+ dependencies: z.record(z.string(), z.string().or(z.null())),
33
+ devDependencies: z.record(z.string(), z.string().or(z.null())),
34
+ subComponents: z.array(z.string().or(httpSubComponent)).default([])
35
+ });
36
+ const registryInfoSchema = z.object({
37
+ variables: z.record(z.string(), z.object({
38
+ description: z.string().optional(),
39
+ default: z.unknown().optional()
40
+ })).optional(),
41
+ env: z.record(z.string(), z.unknown()).optional(),
42
+ indexes: z.array(indexSchema).default([]),
43
+ registries: z.array(z.string()).optional()
44
+ });
45
+ //#endregion
46
+ export { componentSchema, fileSchema, httpSubComponent, indexSchema, namespaces, registryInfoSchema };
47
+
48
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","names":[],"sources":["../../src/registry/schema.ts"],"sourcesContent":["import { z } from 'zod';\n\nexport type NamespaceType = (typeof namespaces)[number];\nexport type CompiledFile = z.input<typeof fileSchema>;\nexport type CompiledComponent = z.input<typeof componentSchema>;\nexport type CompiledRegistryInfo = z.input<typeof registryInfoSchema>;\nexport type DownloadedRegistryInfo = z.output<typeof registryInfoSchema>;\nexport type File = z.output<typeof fileSchema>;\nexport type Component = z.output<typeof componentSchema>;\n\nexport const namespaces = ['components', 'lib', 'css', 'route', 'ui', 'block'] as const;\n\nexport const indexSchema = z.object({\n name: z.string(),\n title: z.string().optional(),\n description: z.string().optional(),\n});\n\nexport const fileSchema = z.object({\n type: z.literal(namespaces),\n path: z.string(),\n target: z.string().optional(),\n content: z.string(),\n});\n\nexport const httpSubComponent = z.object({\n type: z.literal('http'),\n baseUrl: z.string(),\n component: z.string(),\n});\n\nexport const componentSchema = z.object({\n name: z.string(),\n title: z.string().optional(),\n description: z.string().optional(),\n files: z.array(fileSchema),\n dependencies: z.record(z.string(), z.string().or(z.null())),\n devDependencies: z.record(z.string(), z.string().or(z.null())),\n /**\n * list of sub components, either local (component name) or remote (registry info & component name)\n */\n subComponents: z.array(z.string().or(httpSubComponent)).default([]),\n});\n\nexport const registryInfoSchema = z.object({\n /**\n * define used variables, variables can be referenced in the import specifiers of component files.\n */\n variables: z\n .record(\n z.string(),\n z.object({\n description: z.string().optional(),\n default: z.unknown().optional(),\n }),\n )\n .optional(),\n /**\n * provide variables to sub components\n */\n env: z.record(z.string(), z.unknown()).optional(),\n indexes: z.array(indexSchema).default([]),\n\n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AC,CAAC,UAAU;CACjD,SAAS,EAAE,MAAM,YAAY,CAAC,QAAQ,EAAE,CAAC;CAEzC,YAAY,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,UAAU;CAC3C,CAAC"}
@@ -0,0 +1,61 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/registry/schema.d.ts
4
+ type NamespaceType = (typeof namespaces)[number];
5
+ type CompiledFile = z.input<typeof fileSchema>;
6
+ type CompiledComponent = z.input<typeof componentSchema>;
7
+ type CompiledRegistryInfo = z.input<typeof registryInfoSchema>;
8
+ type DownloadedRegistryInfo = z.output<typeof registryInfoSchema>;
9
+ type File = z.output<typeof fileSchema>;
10
+ type Component = z.output<typeof componentSchema>;
11
+ declare const namespaces: readonly ["components", "lib", "css", "route", "ui", "block"];
12
+ declare const indexSchema: z.ZodObject<{
13
+ name: z.ZodString;
14
+ title: z.ZodOptional<z.ZodString>;
15
+ description: z.ZodOptional<z.ZodString>;
16
+ }, z.core.$strip>;
17
+ declare const fileSchema: z.ZodObject<{
18
+ type: z.ZodLiteral<"components" | "lib" | "css" | "route" | "ui" | "block">;
19
+ path: z.ZodString;
20
+ target: z.ZodOptional<z.ZodString>;
21
+ content: z.ZodString;
22
+ }, z.core.$strip>;
23
+ declare const httpSubComponent: z.ZodObject<{
24
+ type: z.ZodLiteral<"http">;
25
+ baseUrl: z.ZodString;
26
+ component: z.ZodString;
27
+ }, z.core.$strip>;
28
+ declare const componentSchema: z.ZodObject<{
29
+ name: z.ZodString;
30
+ title: z.ZodOptional<z.ZodString>;
31
+ description: z.ZodOptional<z.ZodString>;
32
+ files: z.ZodArray<z.ZodObject<{
33
+ type: z.ZodLiteral<"components" | "lib" | "css" | "route" | "ui" | "block">;
34
+ path: z.ZodString;
35
+ target: z.ZodOptional<z.ZodString>;
36
+ content: z.ZodString;
37
+ }, z.core.$strip>>;
38
+ dependencies: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNull]>>;
39
+ devDependencies: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNull]>>;
40
+ subComponents: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
41
+ type: z.ZodLiteral<"http">;
42
+ baseUrl: z.ZodString;
43
+ component: z.ZodString;
44
+ }, z.core.$strip>]>>>;
45
+ }, z.core.$strip>;
46
+ declare const registryInfoSchema: z.ZodObject<{
47
+ variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
48
+ description: z.ZodOptional<z.ZodString>;
49
+ default: z.ZodOptional<z.ZodUnknown>;
50
+ }, z.core.$strip>>>;
51
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
52
+ indexes: z.ZodDefault<z.ZodArray<z.ZodObject<{
53
+ name: z.ZodString;
54
+ title: z.ZodOptional<z.ZodString>;
55
+ description: z.ZodOptional<z.ZodString>;
56
+ }, z.core.$strip>>>;
57
+ registries: z.ZodOptional<z.ZodArray<z.ZodString>>;
58
+ }, z.core.$strip>;
59
+ //#endregion
60
+ export { DownloadedRegistryInfo as a, componentSchema as c, indexSchema as d, namespaces as f, Component as i, fileSchema as l, CompiledFile as n, File as o, registryInfoSchema as p, CompiledRegistryInfo as r, NamespaceType as s, CompiledComponent as t, httpSubComponent as u };
61
+ //# sourceMappingURL=schema-DADC22m_.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-DADC22m_.d.ts","names":[],"sources":["../src/registry/schema.ts"],"mappings":";;;KAEY,aAAA,WAAwB,UAAA;AAAA,KACxB,YAAA,GAAe,CAAA,CAAE,KAAA,QAAa,UAAA;AAAA,KAC9B,iBAAA,GAAoB,CAAA,CAAE,KAAA,QAAa,eAAA;AAAA,KACnC,oBAAA,GAAuB,CAAA,CAAE,KAAA,QAAa,kBAAA;AAAA,KACtC,sBAAA,GAAyB,CAAA,CAAE,MAAA,QAAc,kBAAA;AAAA,KACzC,IAAA,GAAO,CAAA,CAAE,MAAA,QAAc,UAAA;AAAA,KACvB,SAAA,GAAY,CAAA,CAAE,MAAA,QAAc,eAAA;AAAA,cAE3B,UAAA;AAAA,cAEA,WAAA,EAAW,CAAA,CAAA,SAAA;;;;;cAMX,UAAA,EAAU,CAAA,CAAA,SAAA;;;;;;cAOV,gBAAA,EAAgB,CAAA,CAAA,SAAA;;;;;cAMhB,eAAA,EAAe,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;cAaf,kBAAA,EAAkB,CAAA,CAAA,SAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fumadocs/cli",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "description": "The CLI tool for Fumadocs",
5
5
  "keywords": [
6
6
  "Docs",
@@ -17,32 +17,33 @@
17
17
  "dist/*"
18
18
  ],
19
19
  "type": "module",
20
- "main": "./dist/index.js",
21
20
  "exports": {
22
- "./build": {
23
- "types": "./dist/build/index.d.ts",
24
- "import": "./dist/build/index.js"
25
- }
21
+ "./build": "./dist/build/index.js",
22
+ "./config": "./dist/config.js",
23
+ "./registry/client": "./dist/registry/client.js",
24
+ "./registry/installer": "./dist/registry/installer/index.js",
25
+ "./registry/schema": "./dist/registry/schema.js",
26
+ "./package.json": "./package.json"
26
27
  },
27
28
  "publishConfig": {
28
29
  "access": "public"
29
30
  },
30
31
  "dependencies": {
31
- "@clack/prompts": "^1.0.0",
32
+ "@clack/prompts": "^1.1.0",
32
33
  "commander": "^14.0.3",
33
34
  "magic-string": "^0.30.21",
34
- "oxc-parser": "^0.112.0",
35
- "oxc-resolver": "^11.17.0",
35
+ "oxc-parser": "^0.117.0",
36
+ "oxc-resolver": "^11.19.1",
36
37
  "package-manager-detector": "^1.6.0",
37
38
  "picocolors": "^1.1.1",
38
39
  "tinyexec": "^1.0.2",
39
40
  "zod": "^4.3.6"
40
41
  },
41
42
  "devDependencies": {
42
- "@oxc-project/types": "^0.112.0",
43
- "@types/node": "25.2.1",
44
- "shadcn": "3.8.4",
45
- "tsdown": "^0.20.3",
43
+ "@oxc-project/types": "^0.117.0",
44
+ "@types/node": "25.4.0",
45
+ "shadcn": "4.0.5",
46
+ "tsdown": "0.21.1",
46
47
  "eslint-config-custom": "0.0.0",
47
48
  "tsconfig": "0.0.0"
48
49
  },