create-fumadocs-app 16.2.32 → 16.2.33
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/bin.js +3 -5
- package/dist/{constants-BXNeGyPA.js → constants-nRgiNkFI.js} +3 -5
- package/dist/feature-BvpaGt8l.js +572 -0
- package/dist/index-DHK1sZ4O.d.ts +1 -2
- package/dist/index.js +1 -1
- package/dist/plugins/feature.d.ts +1 -2
- package/dist/plugins/feature.js +1 -1
- package/dist/plugins/next-use-src.d.ts +1 -2
- package/dist/plugins/next-use-src.js +0 -2
- package/dist/{src-55Opr41I.js → src-NCKOZrb-.js} +1 -3
- package/package.json +3 -3
- package/template/+next+fuma-docs-mdx/package.json +1 -1
- package/template/+next+fuma-docs-mdx+static/package.json +1 -1
- package/dist/bin.js.map +0 -1
- package/dist/constants-BXNeGyPA.js.map +0 -1
- package/dist/feature-BSyhSuG1.js +0 -26
- package/dist/feature-BSyhSuG1.js.map +0 -1
- package/dist/index-DHK1sZ4O.d.ts.map +0 -1
- package/dist/plugins/feature.d.ts.map +0 -1
- package/dist/plugins/next-use-src.d.ts.map +0 -1
- package/dist/plugins/next-use-src.js.map +0 -1
- package/dist/src-55Opr41I.js.map +0 -1
package/dist/bin.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { n as getPackageManager, r as managers, t as create } from "./src-
|
|
3
|
-
import { i as templates, n as isCI } from "./constants-
|
|
4
|
-
import { t as feature } from "./feature-
|
|
2
|
+
import { n as getPackageManager, r as managers, t as create } from "./src-NCKOZrb-.js";
|
|
3
|
+
import { i as templates, n as isCI } from "./constants-nRgiNkFI.js";
|
|
4
|
+
import { t as feature } from "./feature-BvpaGt8l.js";
|
|
5
5
|
import fs from "node:fs/promises";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import { cancel, confirm, group, intro, isCancel, outro, select, spinner, text } from "@clack/prompts";
|
|
@@ -277,5 +277,3 @@ try {
|
|
|
277
277
|
process.exit(1);
|
|
278
278
|
}
|
|
279
279
|
export {};
|
|
280
|
-
|
|
281
|
-
//# sourceMappingURL=bin.js.map
|
|
@@ -315,7 +315,7 @@ var package_exports$2 = /* @__PURE__ */ __exportAll({
|
|
|
315
315
|
version: () => version$2
|
|
316
316
|
});
|
|
317
317
|
var name$2 = "fumadocs-mdx";
|
|
318
|
-
var version$2 = "15.5.
|
|
318
|
+
var version$2 = "15.5.3";
|
|
319
319
|
var description$2 = "The built-in source for Fumadocs";
|
|
320
320
|
var keywords$2 = ["Docs", "fumadocs"];
|
|
321
321
|
var homepage$2 = "https://fumadocs.dev";
|
|
@@ -600,7 +600,7 @@ var exports$1 = {
|
|
|
600
600
|
"./utils/use-footer-items": "./dist/utils/use-footer-items.js",
|
|
601
601
|
"./utils/use-is-scroll-top": "./dist/utils/use-is-scroll-top.js",
|
|
602
602
|
"./package.json": "./package.json",
|
|
603
|
-
"./components/image-
|
|
603
|
+
"./components/image-zoom.css": "./dist/components/image-zoom.css",
|
|
604
604
|
"./style.css": "./dist/style.css",
|
|
605
605
|
"./css/*": "./css/*"
|
|
606
606
|
};
|
|
@@ -634,7 +634,7 @@ var devDependencies$1 = {
|
|
|
634
634
|
"@types/node": "^26.6.6",
|
|
635
635
|
"@types/react": "^19.3.0",
|
|
636
636
|
"@types/react-dom": "^19.3.0",
|
|
637
|
-
"fuma-cli": "^0.3.
|
|
637
|
+
"fuma-cli": "^0.3.3",
|
|
638
638
|
"fumadocs-core": "workspace:*",
|
|
639
639
|
"react-medium-image-zoom": "^5.4.9",
|
|
640
640
|
"tailwindcss": "^4.3.5",
|
|
@@ -856,5 +856,3 @@ const depVersions = dependencies$4;
|
|
|
856
856
|
for (const workspace of workspaces) depVersions[workspace.name] = workspace.version;
|
|
857
857
|
depVersions["fumadocs-ui"] = `npm:${name$1}@${version$1}`;
|
|
858
858
|
export { templates as i, isCI as n, sourceDir as r, depVersions as t };
|
|
859
|
-
|
|
860
|
-
//# sourceMappingURL=constants-BXNeGyPA.js.map
|
|
@@ -0,0 +1,572 @@
|
|
|
1
|
+
import { t as depVersions } from "./constants-nRgiNkFI.js";
|
|
2
|
+
import { getDefaultConfig } from "@fumadocs/cli/config";
|
|
3
|
+
import { runFeature } from "@fumadocs/cli/features";
|
|
4
|
+
import { loadProject } from "@fumadocs/cli/project";
|
|
5
|
+
// ../../node_modules/.pnpm/fuma-cli@0.3.3/node_modules/fuma-cli/dist/schema-BuNx2JbQ.js
|
|
6
|
+
/**
|
|
7
|
+
* Error thrown when type assertion fails.
|
|
8
|
+
*
|
|
9
|
+
* Thrown by {@link assert}, {@link assertGuard}, and other assert-family
|
|
10
|
+
* functions when input doesn't match expected type `T`. Contains detailed
|
|
11
|
+
* information about the first assertion failure:
|
|
12
|
+
*
|
|
13
|
+
* - `method`: Which typia function threw (e.g., `"typia.assert"`)
|
|
14
|
+
* - `path`: Property path where error occurred (e.g., `"input.user.age"`)
|
|
15
|
+
* - `expected`: Expected type string (e.g., `"number & ExclusiveMinimum<19>"`)
|
|
16
|
+
* - `value`: Actual value that failed validation
|
|
17
|
+
*
|
|
18
|
+
* @template T Expected type (for type safety)
|
|
19
|
+
*/
|
|
20
|
+
var TypeGuardError = class extends Error {
|
|
21
|
+
/**
|
|
22
|
+
* Name of the typia method that threw this error.
|
|
23
|
+
*
|
|
24
|
+
* E.g., `"typia.assert"`, `"typia.assertEquals"`, `"typia.assertGuard"`.
|
|
25
|
+
*/
|
|
26
|
+
method;
|
|
27
|
+
/**
|
|
28
|
+
* Property path where assertion failed.
|
|
29
|
+
*
|
|
30
|
+
* Uses dot notation for nested properties. `undefined` if error occurred at
|
|
31
|
+
* root level.
|
|
32
|
+
*
|
|
33
|
+
* E.g., `"input.age"`, `"input.profile.email"`, `"input[0].name"`.
|
|
34
|
+
*/
|
|
35
|
+
path;
|
|
36
|
+
/**
|
|
37
|
+
* String representation of expected type.
|
|
38
|
+
*
|
|
39
|
+
* E.g., `"string"`, `"number & ExclusiveMinimum<19>"`, `"{ name: string; age:
|
|
40
|
+
* number }"`.
|
|
41
|
+
*/
|
|
42
|
+
expected;
|
|
43
|
+
/**
|
|
44
|
+
* Actual value that failed assertion.
|
|
45
|
+
*
|
|
46
|
+
* The raw value at the error path, useful for debugging.
|
|
47
|
+
*/
|
|
48
|
+
value;
|
|
49
|
+
/**
|
|
50
|
+
* Optional human-readable error description.
|
|
51
|
+
*
|
|
52
|
+
* Primarily for AI agent libraries or custom validation scenarios needing
|
|
53
|
+
* additional context. Standard assertions rely on `path`, `expected`, and
|
|
54
|
+
* `value` for error reporting.
|
|
55
|
+
*/
|
|
56
|
+
description;
|
|
57
|
+
/**
|
|
58
|
+
* Phantom property for TypeScript type safety.
|
|
59
|
+
*
|
|
60
|
+
* Not used at runtime—exists only to preserve generic type `T` in the type
|
|
61
|
+
* system. Always `undefined`.
|
|
62
|
+
*
|
|
63
|
+
* @internal
|
|
64
|
+
*/
|
|
65
|
+
fake_expected_typed_value_;
|
|
66
|
+
/**
|
|
67
|
+
* Creates a new TypeGuardError instance.
|
|
68
|
+
*
|
|
69
|
+
* @param props Error properties
|
|
70
|
+
*/
|
|
71
|
+
constructor(props) {
|
|
72
|
+
super(props.message || `Error on ${props.method}(): invalid type${props.path ? ` on ${props.path}` : ""}, expect to be ${props.expected}`);
|
|
73
|
+
const proto = new.target.prototype;
|
|
74
|
+
if (Object.setPrototypeOf) Object.setPrototypeOf(this, proto);
|
|
75
|
+
else this.__proto__ = proto;
|
|
76
|
+
this.method = props.method;
|
|
77
|
+
this.path = props.path;
|
|
78
|
+
this.expected = props.expected;
|
|
79
|
+
this.value = props.value;
|
|
80
|
+
if (props.description || props.value === void 0) this.description = props.description ?? [
|
|
81
|
+
"The value at this path is `undefined`.",
|
|
82
|
+
"",
|
|
83
|
+
`Please fill the \`${props.expected}\` typed value next time.`
|
|
84
|
+
].join("\n");
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
const _assertGuard = (exceptionable, props, factory) => {
|
|
88
|
+
if (exceptionable === true) {
|
|
89
|
+
if (factory) throw factory(props);
|
|
90
|
+
else throw new TypeGuardError(props);
|
|
91
|
+
}
|
|
92
|
+
return false;
|
|
93
|
+
};
|
|
94
|
+
const _accessExpressionAsString = (str) => variable(str) ? `.${str}` : `[${JSON.stringify(str)}]`;
|
|
95
|
+
const variable = (str) => reserved(str) === false && /^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(str);
|
|
96
|
+
const reserved = (str) => RESERVED.has(str);
|
|
97
|
+
const RESERVED = /* @__PURE__ */ new Set([
|
|
98
|
+
"break",
|
|
99
|
+
"case",
|
|
100
|
+
"catch",
|
|
101
|
+
"class",
|
|
102
|
+
"const",
|
|
103
|
+
"continue",
|
|
104
|
+
"debugger",
|
|
105
|
+
"default",
|
|
106
|
+
"delete",
|
|
107
|
+
"do",
|
|
108
|
+
"else",
|
|
109
|
+
"enum",
|
|
110
|
+
"export",
|
|
111
|
+
"extends",
|
|
112
|
+
"false",
|
|
113
|
+
"finally",
|
|
114
|
+
"for",
|
|
115
|
+
"function",
|
|
116
|
+
"if",
|
|
117
|
+
"import",
|
|
118
|
+
"in",
|
|
119
|
+
"instanceof",
|
|
120
|
+
"new",
|
|
121
|
+
"null",
|
|
122
|
+
"return",
|
|
123
|
+
"super",
|
|
124
|
+
"switch",
|
|
125
|
+
"this",
|
|
126
|
+
"throw",
|
|
127
|
+
"true",
|
|
128
|
+
"try",
|
|
129
|
+
"typeof",
|
|
130
|
+
"var",
|
|
131
|
+
"void",
|
|
132
|
+
"while",
|
|
133
|
+
"with"
|
|
134
|
+
]);
|
|
135
|
+
/** @throws when the input is not a manifest */
|
|
136
|
+
const assertManifest = (() => {
|
|
137
|
+
const _io0 = (input) => "string" === typeof input.name && Array.isArray(input.components) && input.components.every((elem) => "object" === typeof elem && null !== elem && _io1(elem)) && "object" === typeof input.files && null !== input.files && false === Array.isArray(input.files) && _io2(input.files) && (void 0 === input.registries || Array.isArray(input.registries) && input.registries.every((elem) => "string" === typeof elem));
|
|
138
|
+
const _io1 = (input) => "string" === typeof input.name && (void 0 === input.title || "string" === typeof input.title) && (void 0 === input.description || "string" === typeof input.description) && (void 0 === input.unlisted || "boolean" === typeof input.unlisted) && Array.isArray(input.files) && input.files.every((elem) => "string" === typeof elem);
|
|
139
|
+
const _io2 = (input) => Object.keys(input).every((key) => {
|
|
140
|
+
const value = input[key];
|
|
141
|
+
if (void 0 === value) return true;
|
|
142
|
+
return "object" === typeof value && null !== value && _iu0(value);
|
|
143
|
+
});
|
|
144
|
+
const _io3 = (input) => (void 0 === input.dependencies || "object" === typeof input.dependencies && null !== input.dependencies && false === Array.isArray(input.dependencies) && _io4(input.dependencies)) && (void 0 === input.devDependencies || "object" === typeof input.devDependencies && null !== input.devDependencies && false === Array.isArray(input.devDependencies) && _io4(input.devDependencies)) && (void 0 === input.imports || Array.isArray(input.imports) && input.imports.every((elem) => "object" === typeof elem && null !== elem && _io5(elem))) && (void 0 === input.stmtInfos || Array.isArray(input.stmtInfos) && input.stmtInfos.every((elem) => "object" === typeof elem && null !== elem && _io6(elem))) && ("components" === input.type || "lib" === input.type || "css" === input.type || "ui" === input.type || "layout" === input.type) && (void 0 === input.target || "string" === typeof input.target);
|
|
145
|
+
const _io4 = (input) => Object.keys(input).every((key) => {
|
|
146
|
+
const value = input[key];
|
|
147
|
+
if (void 0 === value) return true;
|
|
148
|
+
return null === value || "string" === typeof value;
|
|
149
|
+
});
|
|
150
|
+
const _io5 = (input) => "number" === typeof input.start && "string" === typeof input.id && (void 0 === input.bindings || Array.isArray(input.bindings) && input.bindings.every((elem) => "string" === typeof elem)) && (void 0 === input["package"] || "string" === typeof input["package"]);
|
|
151
|
+
const _io6 = (input) => "number" === typeof input.end && (void 0 === input.declares || Array.isArray(input.declares) && input.declares.every((elem) => "string" === typeof elem)) && (void 0 === input.references || Array.isArray(input.references) && input.references.every((elem) => "number" === typeof elem)) && (void 0 === input["import"] || "boolean" === typeof input["import"]) && (void 0 === input.dependencies || "object" === typeof input.dependencies && null !== input.dependencies && false === Array.isArray(input.dependencies) && _io4(input.dependencies)) && (void 0 === input.devDependencies || "object" === typeof input.devDependencies && null !== input.devDependencies && false === Array.isArray(input.devDependencies) && _io4(input.devDependencies));
|
|
152
|
+
const _io7 = (input) => (void 0 === input.dependencies || "object" === typeof input.dependencies && null !== input.dependencies && false === Array.isArray(input.dependencies) && _io4(input.dependencies)) && (void 0 === input.devDependencies || "object" === typeof input.devDependencies && null !== input.devDependencies && false === Array.isArray(input.devDependencies) && _io4(input.devDependencies)) && (void 0 === input.imports || Array.isArray(input.imports) && input.imports.every((elem) => "object" === typeof elem && null !== elem && _io5(elem))) && (void 0 === input.stmtInfos || Array.isArray(input.stmtInfos) && input.stmtInfos.every((elem) => "object" === typeof elem && null !== elem && _io6(elem))) && "route-handler" === input.type && "string" === typeof input.route;
|
|
153
|
+
const _iu0 = (input) => (() => {
|
|
154
|
+
if ("components" === input.type || "lib" === input.type || "css" === input.type || "ui" === input.type || "layout" === input.type) return _io3(input);
|
|
155
|
+
else if ("route-handler" === input.type) return _io7(input);
|
|
156
|
+
else return false;
|
|
157
|
+
})();
|
|
158
|
+
const _ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || _assertGuard(_exceptionable, {
|
|
159
|
+
method: "typia.createAssert",
|
|
160
|
+
path: _path + ".name",
|
|
161
|
+
expected: "string",
|
|
162
|
+
value: input.name
|
|
163
|
+
}, _errorFactory)) && ((Array.isArray(input.components) || _assertGuard(_exceptionable, {
|
|
164
|
+
method: "typia.createAssert",
|
|
165
|
+
path: _path + ".components",
|
|
166
|
+
expected: "Array<ManifestComponent>",
|
|
167
|
+
value: input.components
|
|
168
|
+
}, _errorFactory)) && input.components.every((elem, _index11) => ("object" === typeof elem && null !== elem || _assertGuard(_exceptionable, {
|
|
169
|
+
method: "typia.createAssert",
|
|
170
|
+
path: _path + ".components[" + _index11 + "]",
|
|
171
|
+
expected: "ManifestComponent",
|
|
172
|
+
value: elem
|
|
173
|
+
}, _errorFactory)) && _ao1(elem, _path + ".components[" + _index11 + "]", _exceptionable) || _assertGuard(_exceptionable, {
|
|
174
|
+
method: "typia.createAssert",
|
|
175
|
+
path: _path + ".components[" + _index11 + "]",
|
|
176
|
+
expected: "ManifestComponent",
|
|
177
|
+
value: elem
|
|
178
|
+
}, _errorFactory)) || _assertGuard(_exceptionable, {
|
|
179
|
+
method: "typia.createAssert",
|
|
180
|
+
path: _path + ".components",
|
|
181
|
+
expected: "Array<ManifestComponent>",
|
|
182
|
+
value: input.components
|
|
183
|
+
}, _errorFactory)) && (("object" === typeof input.files && null !== input.files && false === Array.isArray(input.files) || _assertGuard(_exceptionable, {
|
|
184
|
+
method: "typia.createAssert",
|
|
185
|
+
path: _path + ".files",
|
|
186
|
+
expected: "Record<string, ManifestFile>",
|
|
187
|
+
value: input.files
|
|
188
|
+
}, _errorFactory)) && _ao2(input.files, _path + ".files", _exceptionable) || _assertGuard(_exceptionable, {
|
|
189
|
+
method: "typia.createAssert",
|
|
190
|
+
path: _path + ".files",
|
|
191
|
+
expected: "Record<string, ManifestFile>",
|
|
192
|
+
value: input.files
|
|
193
|
+
}, _errorFactory)) && (void 0 === input.registries || (Array.isArray(input.registries) || _assertGuard(_exceptionable, {
|
|
194
|
+
method: "typia.createAssert",
|
|
195
|
+
path: _path + ".registries",
|
|
196
|
+
expected: "(Array<string> | undefined)",
|
|
197
|
+
value: input.registries
|
|
198
|
+
}, _errorFactory)) && input.registries.every((elem, _index12) => "string" === typeof elem || _assertGuard(_exceptionable, {
|
|
199
|
+
method: "typia.createAssert",
|
|
200
|
+
path: _path + ".registries[" + _index12 + "]",
|
|
201
|
+
expected: "string",
|
|
202
|
+
value: elem
|
|
203
|
+
}, _errorFactory)) || _assertGuard(_exceptionable, {
|
|
204
|
+
method: "typia.createAssert",
|
|
205
|
+
path: _path + ".registries",
|
|
206
|
+
expected: "(Array<string> | undefined)",
|
|
207
|
+
value: input.registries
|
|
208
|
+
}, _errorFactory));
|
|
209
|
+
const _ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || _assertGuard(_exceptionable, {
|
|
210
|
+
method: "typia.createAssert",
|
|
211
|
+
path: _path + ".name",
|
|
212
|
+
expected: "string",
|
|
213
|
+
value: input.name
|
|
214
|
+
}, _errorFactory)) && (void 0 === input.title || "string" === typeof input.title || _assertGuard(_exceptionable, {
|
|
215
|
+
method: "typia.createAssert",
|
|
216
|
+
path: _path + ".title",
|
|
217
|
+
expected: "(string | undefined)",
|
|
218
|
+
value: input.title
|
|
219
|
+
}, _errorFactory)) && (void 0 === input.description || "string" === typeof input.description || _assertGuard(_exceptionable, {
|
|
220
|
+
method: "typia.createAssert",
|
|
221
|
+
path: _path + ".description",
|
|
222
|
+
expected: "(string | undefined)",
|
|
223
|
+
value: input.description
|
|
224
|
+
}, _errorFactory)) && (void 0 === input.unlisted || "boolean" === typeof input.unlisted || _assertGuard(_exceptionable, {
|
|
225
|
+
method: "typia.createAssert",
|
|
226
|
+
path: _path + ".unlisted",
|
|
227
|
+
expected: "(boolean | undefined)",
|
|
228
|
+
value: input.unlisted
|
|
229
|
+
}, _errorFactory)) && ((Array.isArray(input.files) || _assertGuard(_exceptionable, {
|
|
230
|
+
method: "typia.createAssert",
|
|
231
|
+
path: _path + ".files",
|
|
232
|
+
expected: "Array<string>",
|
|
233
|
+
value: input.files
|
|
234
|
+
}, _errorFactory)) && input.files.every((elem, _index13) => "string" === typeof elem || _assertGuard(_exceptionable, {
|
|
235
|
+
method: "typia.createAssert",
|
|
236
|
+
path: _path + ".files[" + _index13 + "]",
|
|
237
|
+
expected: "string",
|
|
238
|
+
value: elem
|
|
239
|
+
}, _errorFactory)) || _assertGuard(_exceptionable, {
|
|
240
|
+
method: "typia.createAssert",
|
|
241
|
+
path: _path + ".files",
|
|
242
|
+
expected: "Array<string>",
|
|
243
|
+
value: input.files
|
|
244
|
+
}, _errorFactory));
|
|
245
|
+
const _ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every((key) => {
|
|
246
|
+
const value = input[key];
|
|
247
|
+
if (void 0 === value) return true;
|
|
248
|
+
return ("object" === typeof value && null !== value || _assertGuard(_exceptionable, {
|
|
249
|
+
method: "typia.createAssert",
|
|
250
|
+
path: _path + _accessExpressionAsString(key),
|
|
251
|
+
expected: "(BaseFile & { type: \"components\" | \"lib\" | \"css\" | \"ui\" | \"layout\"; target?: string | undefined; } | BaseFile & { type: \"route-handler\"; route: string; })",
|
|
252
|
+
value
|
|
253
|
+
}, _errorFactory)) && _au0(value, _path + _accessExpressionAsString(key), _exceptionable) || _assertGuard(_exceptionable, {
|
|
254
|
+
method: "typia.createAssert",
|
|
255
|
+
path: _path + _accessExpressionAsString(key),
|
|
256
|
+
expected: "(BaseFile & { type: \"components\" | \"lib\" | \"css\" | \"ui\" | \"layout\"; target?: string | undefined; } | BaseFile & { type: \"route-handler\"; route: string; })",
|
|
257
|
+
value
|
|
258
|
+
}, _errorFactory);
|
|
259
|
+
});
|
|
260
|
+
const _ao3 = (input, _path, _exceptionable = true) => (void 0 === input.dependencies || ("object" === typeof input.dependencies && null !== input.dependencies && false === Array.isArray(input.dependencies) || _assertGuard(_exceptionable, {
|
|
261
|
+
method: "typia.createAssert",
|
|
262
|
+
path: _path + ".dependencies",
|
|
263
|
+
expected: "(Dependencies | undefined)",
|
|
264
|
+
value: input.dependencies
|
|
265
|
+
}, _errorFactory)) && _ao4(input.dependencies, _path + ".dependencies", _exceptionable) || _assertGuard(_exceptionable, {
|
|
266
|
+
method: "typia.createAssert",
|
|
267
|
+
path: _path + ".dependencies",
|
|
268
|
+
expected: "(Dependencies | undefined)",
|
|
269
|
+
value: input.dependencies
|
|
270
|
+
}, _errorFactory)) && (void 0 === input.devDependencies || ("object" === typeof input.devDependencies && null !== input.devDependencies && false === Array.isArray(input.devDependencies) || _assertGuard(_exceptionable, {
|
|
271
|
+
method: "typia.createAssert",
|
|
272
|
+
path: _path + ".devDependencies",
|
|
273
|
+
expected: "(Dependencies | undefined)",
|
|
274
|
+
value: input.devDependencies
|
|
275
|
+
}, _errorFactory)) && _ao4(input.devDependencies, _path + ".devDependencies", _exceptionable) || _assertGuard(_exceptionable, {
|
|
276
|
+
method: "typia.createAssert",
|
|
277
|
+
path: _path + ".devDependencies",
|
|
278
|
+
expected: "(Dependencies | undefined)",
|
|
279
|
+
value: input.devDependencies
|
|
280
|
+
}, _errorFactory)) && (void 0 === input.imports || (Array.isArray(input.imports) || _assertGuard(_exceptionable, {
|
|
281
|
+
method: "typia.createAssert",
|
|
282
|
+
path: _path + ".imports",
|
|
283
|
+
expected: "(Array<ManifestImport> | undefined)",
|
|
284
|
+
value: input.imports
|
|
285
|
+
}, _errorFactory)) && input.imports.every((elem, _index14) => ("object" === typeof elem && null !== elem || _assertGuard(_exceptionable, {
|
|
286
|
+
method: "typia.createAssert",
|
|
287
|
+
path: _path + ".imports[" + _index14 + "]",
|
|
288
|
+
expected: "ManifestImport",
|
|
289
|
+
value: elem
|
|
290
|
+
}, _errorFactory)) && _ao5(elem, _path + ".imports[" + _index14 + "]", _exceptionable) || _assertGuard(_exceptionable, {
|
|
291
|
+
method: "typia.createAssert",
|
|
292
|
+
path: _path + ".imports[" + _index14 + "]",
|
|
293
|
+
expected: "ManifestImport",
|
|
294
|
+
value: elem
|
|
295
|
+
}, _errorFactory)) || _assertGuard(_exceptionable, {
|
|
296
|
+
method: "typia.createAssert",
|
|
297
|
+
path: _path + ".imports",
|
|
298
|
+
expected: "(Array<ManifestImport> | undefined)",
|
|
299
|
+
value: input.imports
|
|
300
|
+
}, _errorFactory)) && (void 0 === input.stmtInfos || (Array.isArray(input.stmtInfos) || _assertGuard(_exceptionable, {
|
|
301
|
+
method: "typia.createAssert",
|
|
302
|
+
path: _path + ".stmtInfos",
|
|
303
|
+
expected: "(Array<StmtInfo> | undefined)",
|
|
304
|
+
value: input.stmtInfos
|
|
305
|
+
}, _errorFactory)) && input.stmtInfos.every((elem, _index15) => ("object" === typeof elem && null !== elem || _assertGuard(_exceptionable, {
|
|
306
|
+
method: "typia.createAssert",
|
|
307
|
+
path: _path + ".stmtInfos[" + _index15 + "]",
|
|
308
|
+
expected: "StmtInfo",
|
|
309
|
+
value: elem
|
|
310
|
+
}, _errorFactory)) && _ao6(elem, _path + ".stmtInfos[" + _index15 + "]", _exceptionable) || _assertGuard(_exceptionable, {
|
|
311
|
+
method: "typia.createAssert",
|
|
312
|
+
path: _path + ".stmtInfos[" + _index15 + "]",
|
|
313
|
+
expected: "StmtInfo",
|
|
314
|
+
value: elem
|
|
315
|
+
}, _errorFactory)) || _assertGuard(_exceptionable, {
|
|
316
|
+
method: "typia.createAssert",
|
|
317
|
+
path: _path + ".stmtInfos",
|
|
318
|
+
expected: "(Array<StmtInfo> | undefined)",
|
|
319
|
+
value: input.stmtInfos
|
|
320
|
+
}, _errorFactory)) && ("components" === input.type || "lib" === input.type || "css" === input.type || "ui" === input.type || "layout" === input.type || _assertGuard(_exceptionable, {
|
|
321
|
+
method: "typia.createAssert",
|
|
322
|
+
path: _path + ".type",
|
|
323
|
+
expected: "(\"components\" | \"css\" | \"layout\" | \"lib\" | \"ui\")",
|
|
324
|
+
value: input.type
|
|
325
|
+
}, _errorFactory)) && (void 0 === input.target || "string" === typeof input.target || _assertGuard(_exceptionable, {
|
|
326
|
+
method: "typia.createAssert",
|
|
327
|
+
path: _path + ".target",
|
|
328
|
+
expected: "(string | undefined)",
|
|
329
|
+
value: input.target
|
|
330
|
+
}, _errorFactory));
|
|
331
|
+
const _ao4 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every((key) => {
|
|
332
|
+
const value = input[key];
|
|
333
|
+
if (void 0 === value) return true;
|
|
334
|
+
return null === value || "string" === typeof value || _assertGuard(_exceptionable, {
|
|
335
|
+
method: "typia.createAssert",
|
|
336
|
+
path: _path + _accessExpressionAsString(key),
|
|
337
|
+
expected: "(null | string)",
|
|
338
|
+
value
|
|
339
|
+
}, _errorFactory);
|
|
340
|
+
});
|
|
341
|
+
const _ao5 = (input, _path, _exceptionable = true) => ("number" === typeof input.start || _assertGuard(_exceptionable, {
|
|
342
|
+
method: "typia.createAssert",
|
|
343
|
+
path: _path + ".start",
|
|
344
|
+
expected: "number",
|
|
345
|
+
value: input.start
|
|
346
|
+
}, _errorFactory)) && ("string" === typeof input.id || _assertGuard(_exceptionable, {
|
|
347
|
+
method: "typia.createAssert",
|
|
348
|
+
path: _path + ".id",
|
|
349
|
+
expected: "string",
|
|
350
|
+
value: input.id
|
|
351
|
+
}, _errorFactory)) && (void 0 === input.bindings || (Array.isArray(input.bindings) || _assertGuard(_exceptionable, {
|
|
352
|
+
method: "typia.createAssert",
|
|
353
|
+
path: _path + ".bindings",
|
|
354
|
+
expected: "(Array<string> | undefined)",
|
|
355
|
+
value: input.bindings
|
|
356
|
+
}, _errorFactory)) && input.bindings.every((elem, _index16) => "string" === typeof elem || _assertGuard(_exceptionable, {
|
|
357
|
+
method: "typia.createAssert",
|
|
358
|
+
path: _path + ".bindings[" + _index16 + "]",
|
|
359
|
+
expected: "string",
|
|
360
|
+
value: elem
|
|
361
|
+
}, _errorFactory)) || _assertGuard(_exceptionable, {
|
|
362
|
+
method: "typia.createAssert",
|
|
363
|
+
path: _path + ".bindings",
|
|
364
|
+
expected: "(Array<string> | undefined)",
|
|
365
|
+
value: input.bindings
|
|
366
|
+
}, _errorFactory)) && (void 0 === input["package"] || "string" === typeof input["package"] || _assertGuard(_exceptionable, {
|
|
367
|
+
method: "typia.createAssert",
|
|
368
|
+
path: _path + "[\"package\"]",
|
|
369
|
+
expected: "(string | undefined)",
|
|
370
|
+
value: input["package"]
|
|
371
|
+
}, _errorFactory));
|
|
372
|
+
const _ao6 = (input, _path, _exceptionable = true) => ("number" === typeof input.end || _assertGuard(_exceptionable, {
|
|
373
|
+
method: "typia.createAssert",
|
|
374
|
+
path: _path + ".end",
|
|
375
|
+
expected: "number",
|
|
376
|
+
value: input.end
|
|
377
|
+
}, _errorFactory)) && (void 0 === input.declares || (Array.isArray(input.declares) || _assertGuard(_exceptionable, {
|
|
378
|
+
method: "typia.createAssert",
|
|
379
|
+
path: _path + ".declares",
|
|
380
|
+
expected: "(Array<string> | undefined)",
|
|
381
|
+
value: input.declares
|
|
382
|
+
}, _errorFactory)) && input.declares.every((elem, _index17) => "string" === typeof elem || _assertGuard(_exceptionable, {
|
|
383
|
+
method: "typia.createAssert",
|
|
384
|
+
path: _path + ".declares[" + _index17 + "]",
|
|
385
|
+
expected: "string",
|
|
386
|
+
value: elem
|
|
387
|
+
}, _errorFactory)) || _assertGuard(_exceptionable, {
|
|
388
|
+
method: "typia.createAssert",
|
|
389
|
+
path: _path + ".declares",
|
|
390
|
+
expected: "(Array<string> | undefined)",
|
|
391
|
+
value: input.declares
|
|
392
|
+
}, _errorFactory)) && (void 0 === input.references || (Array.isArray(input.references) || _assertGuard(_exceptionable, {
|
|
393
|
+
method: "typia.createAssert",
|
|
394
|
+
path: _path + ".references",
|
|
395
|
+
expected: "(Array<number> | undefined)",
|
|
396
|
+
value: input.references
|
|
397
|
+
}, _errorFactory)) && input.references.every((elem, _index18) => "number" === typeof elem || _assertGuard(_exceptionable, {
|
|
398
|
+
method: "typia.createAssert",
|
|
399
|
+
path: _path + ".references[" + _index18 + "]",
|
|
400
|
+
expected: "number",
|
|
401
|
+
value: elem
|
|
402
|
+
}, _errorFactory)) || _assertGuard(_exceptionable, {
|
|
403
|
+
method: "typia.createAssert",
|
|
404
|
+
path: _path + ".references",
|
|
405
|
+
expected: "(Array<number> | undefined)",
|
|
406
|
+
value: input.references
|
|
407
|
+
}, _errorFactory)) && (void 0 === input["import"] || "boolean" === typeof input["import"] || _assertGuard(_exceptionable, {
|
|
408
|
+
method: "typia.createAssert",
|
|
409
|
+
path: _path + "[\"import\"]",
|
|
410
|
+
expected: "(boolean | undefined)",
|
|
411
|
+
value: input["import"]
|
|
412
|
+
}, _errorFactory)) && (void 0 === input.dependencies || ("object" === typeof input.dependencies && null !== input.dependencies && false === Array.isArray(input.dependencies) || _assertGuard(_exceptionable, {
|
|
413
|
+
method: "typia.createAssert",
|
|
414
|
+
path: _path + ".dependencies",
|
|
415
|
+
expected: "(Dependencies | undefined)",
|
|
416
|
+
value: input.dependencies
|
|
417
|
+
}, _errorFactory)) && _ao4(input.dependencies, _path + ".dependencies", _exceptionable) || _assertGuard(_exceptionable, {
|
|
418
|
+
method: "typia.createAssert",
|
|
419
|
+
path: _path + ".dependencies",
|
|
420
|
+
expected: "(Dependencies | undefined)",
|
|
421
|
+
value: input.dependencies
|
|
422
|
+
}, _errorFactory)) && (void 0 === input.devDependencies || ("object" === typeof input.devDependencies && null !== input.devDependencies && false === Array.isArray(input.devDependencies) || _assertGuard(_exceptionable, {
|
|
423
|
+
method: "typia.createAssert",
|
|
424
|
+
path: _path + ".devDependencies",
|
|
425
|
+
expected: "(Dependencies | undefined)",
|
|
426
|
+
value: input.devDependencies
|
|
427
|
+
}, _errorFactory)) && _ao4(input.devDependencies, _path + ".devDependencies", _exceptionable) || _assertGuard(_exceptionable, {
|
|
428
|
+
method: "typia.createAssert",
|
|
429
|
+
path: _path + ".devDependencies",
|
|
430
|
+
expected: "(Dependencies | undefined)",
|
|
431
|
+
value: input.devDependencies
|
|
432
|
+
}, _errorFactory));
|
|
433
|
+
const _ao7 = (input, _path, _exceptionable = true) => (void 0 === input.dependencies || ("object" === typeof input.dependencies && null !== input.dependencies && false === Array.isArray(input.dependencies) || _assertGuard(_exceptionable, {
|
|
434
|
+
method: "typia.createAssert",
|
|
435
|
+
path: _path + ".dependencies",
|
|
436
|
+
expected: "(Dependencies | undefined)",
|
|
437
|
+
value: input.dependencies
|
|
438
|
+
}, _errorFactory)) && _ao4(input.dependencies, _path + ".dependencies", _exceptionable) || _assertGuard(_exceptionable, {
|
|
439
|
+
method: "typia.createAssert",
|
|
440
|
+
path: _path + ".dependencies",
|
|
441
|
+
expected: "(Dependencies | undefined)",
|
|
442
|
+
value: input.dependencies
|
|
443
|
+
}, _errorFactory)) && (void 0 === input.devDependencies || ("object" === typeof input.devDependencies && null !== input.devDependencies && false === Array.isArray(input.devDependencies) || _assertGuard(_exceptionable, {
|
|
444
|
+
method: "typia.createAssert",
|
|
445
|
+
path: _path + ".devDependencies",
|
|
446
|
+
expected: "(Dependencies | undefined)",
|
|
447
|
+
value: input.devDependencies
|
|
448
|
+
}, _errorFactory)) && _ao4(input.devDependencies, _path + ".devDependencies", _exceptionable) || _assertGuard(_exceptionable, {
|
|
449
|
+
method: "typia.createAssert",
|
|
450
|
+
path: _path + ".devDependencies",
|
|
451
|
+
expected: "(Dependencies | undefined)",
|
|
452
|
+
value: input.devDependencies
|
|
453
|
+
}, _errorFactory)) && (void 0 === input.imports || (Array.isArray(input.imports) || _assertGuard(_exceptionable, {
|
|
454
|
+
method: "typia.createAssert",
|
|
455
|
+
path: _path + ".imports",
|
|
456
|
+
expected: "(Array<ManifestImport> | undefined)",
|
|
457
|
+
value: input.imports
|
|
458
|
+
}, _errorFactory)) && input.imports.every((elem, _index19) => ("object" === typeof elem && null !== elem || _assertGuard(_exceptionable, {
|
|
459
|
+
method: "typia.createAssert",
|
|
460
|
+
path: _path + ".imports[" + _index19 + "]",
|
|
461
|
+
expected: "ManifestImport",
|
|
462
|
+
value: elem
|
|
463
|
+
}, _errorFactory)) && _ao5(elem, _path + ".imports[" + _index19 + "]", _exceptionable) || _assertGuard(_exceptionable, {
|
|
464
|
+
method: "typia.createAssert",
|
|
465
|
+
path: _path + ".imports[" + _index19 + "]",
|
|
466
|
+
expected: "ManifestImport",
|
|
467
|
+
value: elem
|
|
468
|
+
}, _errorFactory)) || _assertGuard(_exceptionable, {
|
|
469
|
+
method: "typia.createAssert",
|
|
470
|
+
path: _path + ".imports",
|
|
471
|
+
expected: "(Array<ManifestImport> | undefined)",
|
|
472
|
+
value: input.imports
|
|
473
|
+
}, _errorFactory)) && (void 0 === input.stmtInfos || (Array.isArray(input.stmtInfos) || _assertGuard(_exceptionable, {
|
|
474
|
+
method: "typia.createAssert",
|
|
475
|
+
path: _path + ".stmtInfos",
|
|
476
|
+
expected: "(Array<StmtInfo> | undefined)",
|
|
477
|
+
value: input.stmtInfos
|
|
478
|
+
}, _errorFactory)) && input.stmtInfos.every((elem, _index20) => ("object" === typeof elem && null !== elem || _assertGuard(_exceptionable, {
|
|
479
|
+
method: "typia.createAssert",
|
|
480
|
+
path: _path + ".stmtInfos[" + _index20 + "]",
|
|
481
|
+
expected: "StmtInfo",
|
|
482
|
+
value: elem
|
|
483
|
+
}, _errorFactory)) && _ao6(elem, _path + ".stmtInfos[" + _index20 + "]", _exceptionable) || _assertGuard(_exceptionable, {
|
|
484
|
+
method: "typia.createAssert",
|
|
485
|
+
path: _path + ".stmtInfos[" + _index20 + "]",
|
|
486
|
+
expected: "StmtInfo",
|
|
487
|
+
value: elem
|
|
488
|
+
}, _errorFactory)) || _assertGuard(_exceptionable, {
|
|
489
|
+
method: "typia.createAssert",
|
|
490
|
+
path: _path + ".stmtInfos",
|
|
491
|
+
expected: "(Array<StmtInfo> | undefined)",
|
|
492
|
+
value: input.stmtInfos
|
|
493
|
+
}, _errorFactory)) && ("route-handler" === input.type || _assertGuard(_exceptionable, {
|
|
494
|
+
method: "typia.createAssert",
|
|
495
|
+
path: _path + ".type",
|
|
496
|
+
expected: "\"route-handler\"",
|
|
497
|
+
value: input.type
|
|
498
|
+
}, _errorFactory)) && ("string" === typeof input.route || _assertGuard(_exceptionable, {
|
|
499
|
+
method: "typia.createAssert",
|
|
500
|
+
path: _path + ".route",
|
|
501
|
+
expected: "string",
|
|
502
|
+
value: input.route
|
|
503
|
+
}, _errorFactory));
|
|
504
|
+
const _au0 = (input, _path, _exceptionable = true) => (() => {
|
|
505
|
+
if ("components" === input.type || "lib" === input.type || "css" === input.type || "ui" === input.type || "layout" === input.type) return _ao3(input, _path, _exceptionable);
|
|
506
|
+
else if ("route-handler" === input.type) return _ao7(input, _path, _exceptionable);
|
|
507
|
+
else return _assertGuard(_exceptionable, {
|
|
508
|
+
method: "typia.createAssert",
|
|
509
|
+
path: _path,
|
|
510
|
+
expected: "(BaseFile & { type: \"components\" | \"lib\" | \"css\" | \"ui\" | \"layout\"; target?: string | undefined; } | BaseFile & { type: \"route-handler\"; route: string; })",
|
|
511
|
+
value: input
|
|
512
|
+
}, _errorFactory);
|
|
513
|
+
})();
|
|
514
|
+
const __is = (input) => "object" === typeof input && null !== input && _io0(input);
|
|
515
|
+
let _errorFactory;
|
|
516
|
+
return (input, errorFactory) => {
|
|
517
|
+
if (false === __is(input)) {
|
|
518
|
+
_errorFactory = errorFactory;
|
|
519
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _assertGuard(true, {
|
|
520
|
+
method: "typia.createAssert",
|
|
521
|
+
path: _path + "",
|
|
522
|
+
expected: "Manifest",
|
|
523
|
+
value: input
|
|
524
|
+
}, _errorFactory)) && _ao0(input, _path + "", true) || _assertGuard(true, {
|
|
525
|
+
method: "typia.createAssert",
|
|
526
|
+
path: _path + "",
|
|
527
|
+
expected: "Manifest",
|
|
528
|
+
value: input
|
|
529
|
+
}, _errorFactory))(input, "$input", true);
|
|
530
|
+
}
|
|
531
|
+
return input;
|
|
532
|
+
};
|
|
533
|
+
})();
|
|
534
|
+
// ../../node_modules/.pnpm/fuma-cli@0.3.3/node_modules/fuma-cli/dist/registry/connector.js
|
|
535
|
+
var HttpRegistryConnector = class {
|
|
536
|
+
baseUrl;
|
|
537
|
+
constructor(baseUrl) {
|
|
538
|
+
this.baseUrl = baseUrl;
|
|
539
|
+
}
|
|
540
|
+
async fetch(pathname, registry) {
|
|
541
|
+
const url = `${this.baseUrl}/${registry ? `${registry}/` : ""}${pathname}`;
|
|
542
|
+
const res = await fetch(url);
|
|
543
|
+
if (!res.ok) throw new Error(`failed to fetch ${url}: ${res.status} ${res.statusText}`);
|
|
544
|
+
return res;
|
|
545
|
+
}
|
|
546
|
+
async fetchManifest(registry) {
|
|
547
|
+
const res = await this.fetch("_registry.json", registry);
|
|
548
|
+
return assertManifest(await res.json());
|
|
549
|
+
}
|
|
550
|
+
async fetchFile(file, registry) {
|
|
551
|
+
return (await this.fetch(`files/${file}`, registry)).bytes();
|
|
552
|
+
}
|
|
553
|
+
};
|
|
554
|
+
// src/plugins/feature.ts
|
|
555
|
+
/** apply a Fumadocs CLI feature to the generated project */
|
|
556
|
+
function feature(feature, options) {
|
|
557
|
+
return { async afterWrite() {
|
|
558
|
+
const config = await getDefaultConfig(this.dest);
|
|
559
|
+
const project = await loadProject(config, this.dest);
|
|
560
|
+
await runFeature(feature, options, {
|
|
561
|
+
project,
|
|
562
|
+
connector: new HttpRegistryConnector("https://fumadocs.dev/registry"),
|
|
563
|
+
versions: depVersions,
|
|
564
|
+
io: {
|
|
565
|
+
log: this.log,
|
|
566
|
+
installDependencies: false,
|
|
567
|
+
confirmOverwrite: async () => true
|
|
568
|
+
}
|
|
569
|
+
});
|
|
570
|
+
} };
|
|
571
|
+
}
|
|
572
|
+
export { feature as t };
|
package/dist/index-DHK1sZ4O.d.ts
CHANGED
|
@@ -57,5 +57,4 @@ interface TemplatePlugin {
|
|
|
57
57
|
readme?: (this: TemplatePluginContext, content: string) => Awaitable<void | string>;
|
|
58
58
|
}
|
|
59
59
|
declare function create(createOptions: Options): Promise<void>;
|
|
60
|
-
export { TemplatePluginContext as a, TemplatePlugin as i, PackageJsonType as n, create as o, Template as r, Options as t };
|
|
61
|
-
//# sourceMappingURL=index-DHK1sZ4O.d.ts.map
|
|
60
|
+
export { TemplatePluginContext as a, TemplatePlugin as i, PackageJsonType as n, create as o, Template as r, Options as t };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as create } from "./src-
|
|
1
|
+
export { t as create } from "./src-NCKOZrb-.js";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { i as TemplatePlugin } from "../index-DHK1sZ4O.js";
|
|
2
2
|
import { Feature } from "@fumadocs/cli/features";
|
|
3
3
|
/** apply a Fumadocs CLI feature to the generated project */
|
|
4
|
-
export declare function feature<O extends object>(feature: Feature<O>, options: O): TemplatePlugin;
|
|
5
|
-
//# sourceMappingURL=feature.d.ts.map
|
|
4
|
+
export declare function feature<O extends object>(feature: Feature<O>, options: O): TemplatePlugin;
|
package/dist/plugins/feature.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as feature } from "../feature-
|
|
1
|
+
export { t as feature } from "../feature-BvpaGt8l.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as templates, r as sourceDir, t as depVersions } from "./constants-
|
|
1
|
+
import { i as templates, r as sourceDir, t as depVersions } from "./constants-nRgiNkFI.js";
|
|
2
2
|
import fs from "node:fs/promises";
|
|
3
3
|
import path, { join } from "node:path";
|
|
4
4
|
import { x } from "tinyexec";
|
|
@@ -141,5 +141,3 @@ async function initPackageJson(projectName, packageJsonPath) {
|
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
143
|
export { getPackageManager as n, managers as r, create as t };
|
|
144
|
-
|
|
145
|
-
//# sourceMappingURL=src-55Opr41I.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-fumadocs-app",
|
|
3
|
-
"version": "16.2.
|
|
3
|
+
"version": "16.2.33",
|
|
4
4
|
"description": "Create a new documentation site with Fumadocs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Docs",
|
|
@@ -40,15 +40,15 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@clack/prompts": "^1.8.1",
|
|
43
|
-
"@fumadocs/cli": "1.8.
|
|
43
|
+
"@fumadocs/cli": "1.8.4",
|
|
44
44
|
"cac": "^7.1.0",
|
|
45
|
-
"fuma-cli": "^0.3.1",
|
|
46
45
|
"picocolors": "^1.1.1",
|
|
47
46
|
"tinyexec": "^1.3.1"
|
|
48
47
|
},
|
|
49
48
|
"devDependencies": {
|
|
50
49
|
"@types/cross-spawn": "^6.0.6",
|
|
51
50
|
"@types/node": "26.6.6",
|
|
51
|
+
"fuma-cli": "^0.3.3",
|
|
52
52
|
"tinyglobby": "^0.2.17",
|
|
53
53
|
"tsconfig": "0.0.0",
|
|
54
54
|
"tsdown": "0.23.7",
|
package/dist/bin.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bin.js","names":[],"sources":["../src/bin.ts"],"sourcesContent":["#!/usr/bin/env node\nimport fs from 'node:fs/promises';\nimport path from 'node:path';\nimport {\n cancel,\n confirm,\n group,\n intro,\n isCancel,\n outro,\n select,\n spinner,\n text,\n} from '@clack/prompts';\nimport pc from 'picocolors';\nimport { getPackageManager, managers, type PackageManager } from './auto-install';\nimport { create, type Template, type TemplatePlugin } from './index';\nimport { isCI, templates } from './constants';\nimport { cac } from 'cac';\nimport { feature } from './plugins/feature';\nimport { ai, type AIProvider } from '@fumadocs/cli/features/ai';\nimport { lint } from '@fumadocs/cli/features/lint';\nimport { og } from '@fumadocs/cli/features/og';\nimport { search, type SearchProvider } from '@fumadocs/cli/features/search';\n\nconst linters = ['eslint', 'oxlint', 'biome'] as const;\nconst searchProviders = [\n 'orama',\n 'orama-cloud',\n 'algolia',\n 'meilisearch',\n 'typesense',\n 'mixedbread',\n] as const;\nconst ogImages = ['next-og', 'takumi'] as const;\nconst aiChats = ['openrouter', 'llmgateway', 'inkeep'] as const;\nconst templateNames = templates.map((item) => item.value);\n\ninterface CliOptions {\n src?: boolean;\n install?: boolean;\n git: boolean;\n yes?: boolean;\n linter?: (typeof linters)[number];\n search?: SearchProvider | 'orama';\n ogImage?: (typeof ogImages)[number];\n aiChat?: AIProvider;\n template?: Template;\n pm: PackageManager;\n}\n\nconst cli = cac('create-fumadocs-app');\n\ncli\n .command('[name]', 'create a Fumadocs app, [name] is the project name')\n .option('--src', '(Next.js only) enable `src/` directory')\n .option('--install', 'install packages automatically')\n .option('--no-git', 'disable auto Git repository initialization')\n .option('-y, --yes', 'skip prompts and use defaults for unspecified options')\n .option(\n '--linter <name>',\n `configure a linter/formatter, ESLint is currently Next.js only. (${linters.join(', ')})`,\n )\n .option('--search <name>', `configure a search solution (${searchProviders.join(', ')})`)\n .option('--og-image <name>', `configure OG image generation (${ogImages.join(', ')})`)\n .option('--ai-chat <name>', `configure AI chat (${aiChats.join(', ')})`)\n .option('--template <name>', `choose a template (${templateNames.join(', ')})`)\n .option('--pm <name>', `choose a package manager (${managers.join(', ')})`, {\n default: getPackageManager(),\n })\n .action(main);\n\n/** templates without a server at runtime */\nconst isStatic = (template: Template) =>\n template === 'astro' || template === '+next+fuma-docs-mdx+static' || template.endsWith('-spa');\n\nfunction checkOption(name: string, value: string | undefined, choices: readonly string[]) {\n if (value !== undefined && !choices.includes(value))\n throw new Error(`invalid value for --${name}: ${value}, expected: ${choices.join(', ')}`);\n}\n\nasync function main(defaultName: string | undefined, config: CliOptions): Promise<void> {\n checkOption('linter', config.linter, linters);\n checkOption('search', config.search, searchProviders);\n checkOption('og-image', config.ogImage, ogImages);\n checkOption('ai-chat', config.aiChat, aiChats);\n checkOption('template', config.template, templateNames);\n checkOption('pm', config.pm, managers);\n const skipPrompts = isCI || config.yes === true;\n intro(pc.bgCyan(pc.bold('Create Fumadocs App')));\n\n const options = await group(\n {\n name: async () => {\n if (defaultName) return defaultName;\n if (skipPrompts) return 'untitled';\n\n return text({\n message: 'Project name',\n placeholder: 'my-app',\n defaultValue: 'my-app',\n });\n },\n template: async () => {\n if (config.template) return config.template;\n if (skipPrompts) return '+next+fuma-docs-mdx';\n\n return select<Template>({\n message: 'Choose a template',\n initialValue: '+next+fuma-docs-mdx',\n options: templates,\n });\n },\n src: async ({ results }: { results: { template?: Template } }) => {\n if (config.src !== undefined) return config.src;\n if (skipPrompts || !results.template?.startsWith('+next')) return false;\n\n return confirm({\n message: 'Use `/src` directory?',\n initialValue: false,\n });\n },\n lint: async ({ results }: { results: { template?: Template } }) => {\n if (config.linter !== undefined) return config.linter;\n if (skipPrompts) return 'disabled';\n\n return select({\n message: 'Configure linter?',\n options: results.template?.startsWith('+next')\n ? [\n {\n value: 'disabled',\n label: 'Disabled',\n },\n {\n value: 'eslint',\n label: 'ESLint',\n },\n {\n value: 'biome',\n label: 'Biome',\n },\n {\n value: 'oxlint',\n label: 'Oxlint',\n },\n ]\n : [\n {\n value: 'disabled',\n label: 'Disabled',\n },\n {\n value: 'biome',\n label: 'Biome',\n },\n {\n value: 'oxlint',\n label: 'Oxlint',\n },\n ],\n });\n },\n search: async ({ results }: { results: { template?: Template } }) => {\n if (config.search !== undefined) return config.search;\n if (skipPrompts) return 'orama';\n\n return select({\n message: 'Choose a search solution?',\n options: [\n {\n value: 'orama',\n label: 'Default',\n hint: 'local search powered by ZBSearch, recommended',\n },\n {\n value: 'orama-cloud',\n label: 'Orama Cloud',\n hint: '3rd party search solution, signup needed',\n },\n { value: 'algolia', label: 'Algolia', hint: 'signup needed' },\n { value: 'meilisearch', label: 'Meilisearch', hint: 'self-hosted or cloud' },\n { value: 'typesense', label: 'Typesense', hint: 'self-hosted or cloud' },\n // searches on a server\n ...(isStatic(results.template!)\n ? []\n : [{ value: 'mixedbread', label: 'Mixedbread', hint: 'AI search, signup needed' }]),\n ],\n });\n },\n ogImage: async ({ results }: { results: { template?: Template } }) => {\n if (config.ogImage !== undefined) return config.ogImage;\n if (!results.template?.startsWith('+next')) return 'takumi';\n if (skipPrompts) return 'next/og';\n\n return select({\n message: 'Configure Open Graph Image generation?',\n options: [\n {\n value: 'next/og',\n label: 'next/og',\n hint: 'Next.js built-in solution',\n },\n {\n value: 'takumi',\n label: 'Takumi',\n hint: 'Output WebP format, framework-agnostic',\n },\n ],\n });\n },\n aiChat: async ({ results }: { results: { template?: Template } }) => {\n if (config.aiChat !== undefined) return config.aiChat;\n if (skipPrompts || isStatic(results.template!)) return false;\n\n return select<false | 'openrouter' | 'llmgateway' | 'inkeep'>({\n message: 'Configure AI Chat?',\n options: [\n {\n value: false,\n label: 'No',\n },\n {\n value: 'openrouter',\n label: 'AI SDK',\n hint: 'default to OpenRouter',\n },\n {\n value: 'llmgateway',\n label: 'LLMGateway',\n hint: 'open-source LLM gateway, API key required',\n },\n {\n value: 'inkeep',\n label: 'Inkeep AI',\n hint: 'API key required',\n },\n ],\n });\n },\n installDeps: async () => {\n if (config.install !== undefined) return config.install;\n if (skipPrompts) return false;\n\n return confirm({\n message: `Do you want to install packages automatically? (detected as ${config.pm})`,\n });\n },\n },\n {\n onCancel: () => {\n cancel('Installation Stopped.');\n process.exit(0);\n },\n },\n );\n\n const projectName = options.name.toLowerCase().replace(/\\s/, '-');\n if (options.aiChat && isStatic(options.template)) {\n console.warn(pc.yellow('AI Chat needs a server, the template is static, skipping it.'));\n options.aiChat = false;\n }\n if (options.ogImage === 'next-og' && !options.template.startsWith('+next')) {\n console.warn(\n pc.yellow('next/og is only available on Next.js, the template uses Takumi instead.'),\n );\n }\n\n if (!isCI) await checkDir(projectName, skipPrompts);\n\n const info = spinner();\n info.start(`Generating Project`);\n const plugins: TemplatePlugin[] = [];\n\n if (options.src) {\n const { nextUseSrc } = await import('./plugins/next-use-src');\n plugins.push(nextUseSrc());\n }\n\n if (options.search !== 'orama') plugins.push(feature(search, { provider: options.search }));\n if (options.lint !== 'disabled') plugins.push(feature(lint, { linter: options.lint }));\n if (options.ogImage === 'takumi' && options.template.startsWith('+next'))\n plugins.push(feature(og, { engine: 'takumi' }));\n if (options.aiChat) plugins.push(feature(ai, { provider: options.aiChat }));\n\n await create({\n packageManager: config.pm,\n template: options.template,\n outputDir: projectName,\n installDeps: options.installDeps,\n initializeGit: config.git,\n plugins,\n log: (message) => {\n info.message(message);\n },\n });\n\n info.stop('Project Generated');\n\n outro(pc.bgGreen(pc.bold('Done')));\n\n console.log(pc.bold('\\nOpen the project'));\n console.log(pc.cyan(`cd ${projectName}`));\n\n console.log(pc.bold('\\nRun Development Server'));\n if (config.pm === 'npm' || config.pm === 'bun') {\n console.log(pc.cyan(`${config.pm} run dev`));\n } else {\n console.log(pc.cyan(`${config.pm} dev`));\n }\n console.log(pc.bold('\\nYou can now open the project and start writing documents'));\n\n process.exit(0);\n}\n\nasync function checkDir(outputDir: string, skipPrompts: boolean) {\n const destDir = await fs.readdir(outputDir).catch(() => null);\n if (!destDir || destDir.length === 0) return;\n if (skipPrompts) {\n cancel(`directory ${outputDir} already exists and is not empty.`);\n process.exit(1);\n }\n const del = await confirm({\n message: `directory ${outputDir} already exists, do you want to delete its files?`,\n });\n\n if (isCancel(del)) {\n cancel();\n process.exit(1);\n }\n\n if (!del) return;\n\n const info = spinner();\n info.start(`Deleting files in ${outputDir}`);\n\n await Promise.all(\n destDir.map((item) => {\n return fs.rm(path.join(outputDir, item), {\n recursive: true,\n force: true,\n });\n }),\n );\n\n info.stop(`Deleted files in ${outputDir}`);\n}\n\ncli.help();\n\ntry {\n cli.parse(process.argv, { run: false });\n await cli.runMatchedCommand();\n} catch (e) {\n console.error(pc.red(e instanceof Error ? e.message : String(e)));\n process.exit(1);\n}\n"],"mappings":";;;;;;;;;;;;;;AAyBA,MAAM,UAAU;CAAC;CAAU;CAAU;AAAO;AAC5C,MAAM,kBAAkB;CACtB;CACA;CACA;CACA;CACA;CACA;AACF;AACA,MAAM,WAAW,CAAC,WAAW,QAAQ;AACrC,MAAM,UAAU;CAAC;CAAc;CAAc;AAAQ;AACrD,MAAM,gBAAgB,UAAU,KAAK,SAAS,KAAK,KAAK;AAexD,MAAM,MAAM,IAAI,qBAAqB;AAErC,IACG,QAAQ,UAAU,mDAAmD,CAAC,CACtE,OAAO,SAAS,wCAAwC,CAAC,CACzD,OAAO,aAAa,gCAAgC,CAAC,CACrD,OAAO,YAAY,4CAA4C,CAAC,CAChE,OAAO,aAAa,uDAAuD,CAAC,CAC5E,OACC,mBACA,oEAAoE,QAAQ,KAAK,IAAI,EAAE,EACzF,CAAC,CACA,OAAO,mBAAmB,gCAAgC,gBAAgB,KAAK,IAAI,EAAE,EAAE,CAAC,CACxF,OAAO,qBAAqB,kCAAkC,SAAS,KAAK,IAAI,EAAE,EAAE,CAAC,CACrF,OAAO,oBAAoB,sBAAsB,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ChE,QAAQ,KAAK,CAAC;CAChB;CACA,MAAM,MAAM,MAAM,QAAQ,EACxB,SAAS,aAAa,UAAU,mDAClC,CAAC;CAED,IAAI,SAAS,GAAG,GAAG;EACjB,OAAO;EACP,QAAQ,KAAK,CAAC;CAChB;CAEA,IAAI,CAAC,KAAK;CAEV,MAAM,OAAO,QAAQ;CACrB,KAAK,MAAM,qBAAqB,WAAW;CAE3C,MAAM,QAAQ,IACZ,QAAQ,KAAK,SAAS;EACpB,OAAO,GAAG,GAAG,KAAK,KAAK,WAAW,IAAI,GAAG;GACvC,WAAW;GACX,OAAO;EACT,CAAC;CACH,CAAC,CACH;CAEA,KAAK,KAAK,oBAAoB,WAAW;AAC3C;AAEA,IAAI,KAAK;AAET,IAAI;CACF,IAAI,MAAM,QAAQ,MAAM,EAAE,KAAK,MAAM,CAAC;CACtC,MAAM,IAAI,kBAAkB;AAC9B,SAAS,GAAG;CACV,QAAQ,MAAM,GAAG,IAAI,aAAa,QAAQ,EAAE,UAAU,OAAO,CAAC,CAAC,CAAC;CAChE,QAAQ,KAAK,CAAC;AAChB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants-BXNeGyPA.js","names":["corePkg","mdxPkg","basePkg","astroPkg","versionPkg.dependencies","basePkg.name","basePkg.version"],"sources":["../../create-app-versions/package.json","../../core/package.json","../../mdx/package.json","../../base-ui/package.json","../../astro/package.json","../src/constants.ts"],"sourcesContent":["","","","","","import { fileURLToPath } from 'node:url';\nimport versionPkg from '../../create-app-versions/package.json';\nimport * as corePkg from '../../core/package.json';\nimport * as mdxPkg from '../../mdx/package.json';\nimport * as basePkg from '../../base-ui/package.json';\nimport * as astroPkg from '../../astro/package.json';\n\nexport const sourceDir = fileURLToPath(new URL(`../`, import.meta.url).href);\n\nexport const isCI = Boolean(process.env.CI);\n\nexport interface TemplateInfo {\n value:\n | '+next+fuma-docs-mdx'\n | 'astro'\n | 'waku'\n | 'react-router'\n | 'react-router-spa'\n | 'tanstack-start'\n | 'tanstack-start-spa'\n | '+next+fuma-docs-mdx+static';\n label: string;\n appDir: string;\n /**\n * path to root provider, relative to `appDir`\n */\n rootProviderPath: string;\n hint?: string;\n /**\n * rename files when copying from template\n */\n rename?: (name: string) => string;\n}\n\nexport const templates: TemplateInfo[] = [\n {\n value: '+next+fuma-docs-mdx',\n label: 'Next.js: Fumadocs MDX',\n hint: 'recommended: powerful and mature',\n appDir: '',\n rootProviderPath: 'app/layout.tsx',\n },\n {\n value: 'waku',\n label: 'Waku: Fumadocs MDX',\n hint: 'recommended: fast and simple',\n appDir: 'src',\n rootProviderPath: 'components/provider.tsx',\n },\n {\n value: '+next+fuma-docs-mdx+static',\n label: 'Next.js Static: Fumadocs MDX',\n appDir: '',\n rootProviderPath: 'components/provider.tsx',\n },\n {\n value: 'react-router',\n label: 'React Router: Fumadocs MDX (not RSC)',\n appDir: 'app',\n rootProviderPath: 'root.tsx',\n },\n {\n value: 'react-router-spa',\n label: 'React Router SPA: Fumadocs MDX (not RSC)',\n hint: 'SPA mode allows you to host the site statically, compatible with a CDN.',\n appDir: 'app',\n rootProviderPath: 'root.tsx',\n },\n {\n value: 'tanstack-start',\n label: 'Tanstack Start: Fumadocs MDX (not RSC)',\n appDir: 'src',\n rootProviderPath: 'routes/__root.tsx',\n },\n {\n value: 'tanstack-start-spa',\n label: 'Tanstack Start SPA: Fumadocs MDX (not RSC)',\n hint: 'SPA mode allows you to host the site statically, compatible with a CDN.',\n appDir: 'src',\n rootProviderPath: 'routes/__root.tsx',\n },\n {\n value: 'astro',\n label: 'Astro: Content Collections',\n appDir: 'src',\n rootProviderPath: 'components/provider.tsx',\n },\n];\n\nconst workspaces = [corePkg, mdxPkg, basePkg, astroPkg];\n\nexport const depVersions = versionPkg.dependencies;\n\nfor (const workspace of workspaces) {\n depVersions[workspace.name as keyof typeof depVersions] = workspace.version;\n}\n\ndepVersions['fumadocs-ui'] = `npm:${basePkg.name}@${basePkg.version}`;\n"],"mappings":";;;;;;;;;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AO;EACP,OAAO;EACP,QAAQ;EACR,kBAAkB;CACpB;CACA;EACE,OAAO;EACP,OAAO;EACP,QAAQ;EACR,kBAAkB;CACpB;CACA;EACE,OAAO;EACP,OAAO;EACP,MAAM;EACN,QAAQ;EACR,kBAAkB;CACpB;CACA;EACE,OAAO;EACP,OAAO;EACP,QAAQ;EACR,kBAAkB;CACpB;CACA;EACE,OAAO;EACP,OAAO;EACP,MAAM;EACN,QAAQ;EACR,kBAAkB;CACpB;CACA;EACE,OAAO;EACP,OAAO;EACP,QAAQ;EACR,kBAAkB;CACpB;AACF;AAEA,MAAM,aAAa;CAACA;CAASC;CAAQC;CAASC;AAAQ;AAEtD,MAAa,cAAcC;AAE3B,KAAK,MAAM,aAAa,YACtB,YAAY,UAAU,QAAoC,UAAU;AAGtE,YAAY,iBAAiB,OAAOC,OAAa,GAAGC"}
|
package/dist/feature-BSyhSuG1.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { t as depVersions } from "./constants-BXNeGyPA.js";
|
|
2
|
-
import { HttpRegistryConnector } from "fuma-cli/registry/connector";
|
|
3
|
-
import { getDefaultConfig } from "@fumadocs/cli/config";
|
|
4
|
-
import { runFeature } from "@fumadocs/cli/features";
|
|
5
|
-
import { loadProject } from "@fumadocs/cli/project";
|
|
6
|
-
// src/plugins/feature.ts
|
|
7
|
-
/** apply a Fumadocs CLI feature to the generated project */
|
|
8
|
-
function feature(feature, options) {
|
|
9
|
-
return { async afterWrite() {
|
|
10
|
-
const config = await getDefaultConfig(this.dest);
|
|
11
|
-
const project = await loadProject(config, this.dest);
|
|
12
|
-
await runFeature(feature, options, {
|
|
13
|
-
project,
|
|
14
|
-
connector: new HttpRegistryConnector("https://fumadocs.dev/registry"),
|
|
15
|
-
versions: depVersions,
|
|
16
|
-
io: {
|
|
17
|
-
log: this.log,
|
|
18
|
-
installDependencies: false,
|
|
19
|
-
confirmOverwrite: async () => true
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
} };
|
|
23
|
-
}
|
|
24
|
-
export { feature as t };
|
|
25
|
-
|
|
26
|
-
//# sourceMappingURL=feature-BSyhSuG1.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"feature-BSyhSuG1.js","names":[],"sources":["../src/plugins/feature.ts"],"sourcesContent":["import type { TemplatePlugin } from '@/index';\nimport { HttpRegistryConnector } from 'fuma-cli/registry/connector';\nimport { getDefaultConfig } from '@fumadocs/cli/config';\nimport { type Feature, runFeature } from '@fumadocs/cli/features';\nimport { loadProject } from '@fumadocs/cli/project';\nimport { depVersions } from '@/constants';\n\n/** apply a Fumadocs CLI feature to the generated project */\nexport function feature<O extends object>(feature: Feature<O>, options: O): TemplatePlugin {\n return {\n async afterWrite() {\n const config = await getDefaultConfig(this.dest);\n const project = await loadProject(config, this.dest);\n\n await runFeature(feature, options, {\n project,\n connector: new HttpRegistryConnector('https://fumadocs.dev/registry'),\n versions: depVersions,\n io: { log: this.log, installDependencies: false, confirmOverwrite: async () => true },\n });\n },\n };\n}\n"],"mappings":";;;;;;;AAQA,SAAgB,QAA0B,SAAqB,SAA4B;CACzF,OAAO,EACL,MAAM,aAAa;EACjB,MAAM,SAAS,MAAM,iBAAiB,KAAK,IAAI;EAC/C,MAAM,UAAU,MAAM,YAAY,QAAQ,KAAK,IAAI;EAEnD,MAAM,WAAW,SAAS,SAAS;GACjC;GACA,WAAW,IAAI,sBAAsB,+BAA+B;GACpE,UAAU;GACV,IAAI;IAAE,KAAK,KAAK;IAAK,qBAAqB;IAAO,kBAAkB,YAAY;GAAK;EACtF,CAAC;CACH,EACF;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-DHK1sZ4O.d.ts","names":[],"sources":["../src/auto-install.ts","../src/constants.ts","../src/index.ts"],"mappings":"A,KAEY,yBAAyB;cAExB;UCOI;EACf;EASA;EACA;;;;EAIA;EACA;;;;EAIA,UAAU;;KCxBA,WAAW;UACN;EACf;EACA,UAAU;;;;;;EAOV,iBAAiB;EAEjB;EACA;EACA,OAAO;EACP,UAAU;;UAGK;EACf,UAAU;EACV,MAAM;;;;EAIN;;;;EAKA;;KAGU;EACV;EACA;EACA;EACA,UAAU;EACV,eAAe;EACf,kBAAkB;IAChB;KAEC,UAAU,KAAK,IAAI,QAAQ;UAEf;EACf,YACE,MAAM,KAAK,gCACX,MAAM,iBACH,iBAAiB;EACtB,eACE,MAAM,uBACN,aAAa,oBACV,iBAAiB;EACtB,cAAc,MAAM,0BAA0B;EAC9C,UAAU,MAAM,uBAAuB,oBAAoB;;iBAGvC,OAAO,eAAe,UAAU"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"feature.d.ts","names":[],"sources":["../../src/plugins/feature.ts"],"mappings":";;;wBAQgB,QAAQ,kBAAkB,SAAS,QAAQ,IAAI,SAAS,IAAI"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"next-use-src.d.ts","names":[],"sources":["../../src/plugins/next-use-src.ts"],"mappings":";;;;wBAOgB,cAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"next-use-src.js","names":[],"sources":["../../src/plugins/next-use-src.ts"],"sourcesContent":["import { TemplatePlugin } from '@/index';\nimport path from 'node:path';\nimport fs from 'node:fs/promises';\n\n/**\n * Use `src` for app directory\n */\nexport function nextUseSrc(): TemplatePlugin {\n return {\n template(info) {\n if (!info.value.startsWith('+next')) return;\n\n return {\n ...info,\n appDir: 'src',\n rename: (file) => {\n if (\n isRelative(path.join(this.dest, 'app'), file) ||\n isRelative(path.join(this.dest, 'lib'), file) ||\n isRelative(path.join(this.dest, 'components'), file) ||\n isRootConventionFile(this.dest, file)\n ) {\n return path.join(this.dest, 'src', path.relative(this.dest, file));\n }\n\n return file;\n },\n };\n },\n // update tsconfig.json for src dir\n async afterWrite() {\n if (!this.template.value.startsWith('+next')) return;\n\n const tsconfigPath = path.join(this.dest, 'tsconfig.json');\n const content = await fs.readFile(tsconfigPath, 'utf-8');\n const config = JSON.parse(content);\n\n if (config.compilerOptions?.paths) {\n Object.assign(config.compilerOptions.paths, {\n '@/*': ['./src/*'],\n });\n }\n\n await fs.writeFile(tsconfigPath, JSON.stringify(config, null, 2));\n },\n };\n}\n\n/**\n * Next.js only reads these files from the same level as `app`, so they must move into `src` too.\n */\nconst rootConventionFiles = ['proxy', 'middleware', 'instrumentation', 'instrumentation-client'];\n\nfunction isRootConventionFile(dest: string, file: string) {\n const relative = path.relative(dest, file);\n if (relative.includes(path.sep)) return false;\n\n return rootConventionFiles.includes(relative.replace(/\\.(ts|js|mts|mjs)$/, ''));\n}\n\nfunction isRelative(dir: string, file: string) {\n return !path.relative(dir, file).startsWith(`..${path.sep}`);\n}\n"],"mappings":";;;;;;AAOA,SAAgB,aAA6B;CAC3C,OAAO;EACL,SAAS,MAAM;GACb,IAAI,CAAC,KAAK,MAAM,WAAW,OAAO,GAAG;GAErC,OAAO;IACL,GAAG;IACH,QAAQ;IACR,SAAS,SAAS;KAChB,IACE,WAAW,KAAK,KAAK,KAAK,MAAM,KAAK,GAAG,IAAI,KAC5C,WAAW,KAAK,KAAK,KAAK,MAAM,KAAK,GAAG,IAAI,KAC5C,WAAW,KAAK,KAAK,KAAK,MAAM,YAAY,GAAG,IAAI,KACnD,qBAAqB,KAAK,MAAM,IAAI,GAEpC,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,KAAK,SAAS,KAAK,MAAM,IAAI,CAAC;KAGnE,OAAO;IACT;GACF;EACF;EAEA,MAAM,aAAa;GACjB,IAAI,CAAC,KAAK,SAAS,MAAM,WAAW,OAAO,GAAG;GAE9C,MAAM,eAAe,KAAK,KAAK,KAAK,MAAM,eAAe;GACzD,MAAM,UAAU,MAAM,GAAG,SAAS,cAAc,OAAO;GACvD,MAAM,SAAS,KAAK,MAAM,OAAO;GAEjC,IAAI,OAAO,iBAAiB,OAC1B,OAAO,OAAO,OAAO,gBAAgB,OAAO,EAC1C,OAAO,CAAC,SAAS,EACnB,CAAC;GAGH,MAAM,GAAG,UAAU,cAAc,KAAK,UAAU,QAAQ,MAAM,CAAC,CAAC;EAClE;CACF;AACF;;;;AAKA,MAAM,sBAAsB;CAAC;CAAS;CAAc;CAAmB;AAAwB;AAE/F,SAAS,qBAAqB,MAAc,MAAc;CACxD,MAAM,WAAW,KAAK,SAAS,MAAM,IAAI;CACzC,IAAI,SAAS,SAAS,KAAK,GAAG,GAAG,OAAO;CAExC,OAAO,oBAAoB,SAAS,SAAS,QAAQ,sBAAsB,EAAE,CAAC;AAChF;AAEA,SAAS,WAAW,KAAa,MAAc;CAC7C,OAAO,CAAC,KAAK,SAAS,KAAK,IAAI,CAAC,CAAC,WAAW,KAAK,KAAK,KAAK;AAC7D"}
|
package/dist/src-55Opr41I.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"src-55Opr41I.js","names":[],"sources":["../src/auto-install.ts","../src/utils.ts","../src/index.ts"],"sourcesContent":["import { x } from 'tinyexec';\n\nexport type PackageManager = (typeof managers)[number];\n\nexport const managers = ['npm', 'yarn', 'bun', 'pnpm'] as const;\n\nexport function getPackageManager(): PackageManager {\n const userAgent = process.env.npm_config_user_agent ?? '';\n\n if (userAgent.startsWith('yarn')) {\n return 'yarn';\n }\n\n if (userAgent.startsWith('pnpm')) {\n return 'pnpm';\n }\n\n if (userAgent.startsWith('bun')) {\n return 'bun';\n }\n\n return 'npm';\n}\n\nexport async function autoInstall(manager: PackageManager, dest: string) {\n await x(manager, ['install'], {\n throwOnError: true,\n nodeOptions: {\n env: {\n ...process.env,\n NODE_ENV: 'development',\n DISABLE_OPENCOLLECTIVE: '1',\n },\n cwd: dest,\n },\n });\n}\n","import fs from 'node:fs/promises';\nimport path, { join } from 'node:path';\nimport { x } from 'tinyexec';\n\nexport async function copy(\n from: string,\n to: string,\n options: {\n rename?: (s: string) => string;\n filter?: (s: string) => boolean;\n filterDir?: (dir: string) => boolean;\n } = {},\n): Promise<void> {\n const { rename = (s) => s, filterDir = () => true, filter = () => true } = options;\n const stats = await fs.stat(from);\n\n if (stats.isDirectory() && filterDir(from)) {\n const files = await fs.readdir(from);\n\n await Promise.all(\n files.map((file) => copy(path.join(from, file), path.join(to, file), options)),\n );\n }\n\n if (stats.isFile() && filter(from)) {\n to = rename(to);\n await fs.mkdir(path.dirname(to), { recursive: true });\n await fs.copyFile(from, to);\n }\n}\n\nasync function isInGitRepository(cwd: string) {\n const { exitCode } = await x('git', ['rev-parse', '--is-inside-work-tree'], {\n nodeOptions: { cwd },\n });\n\n return exitCode === 0;\n}\n\nasync function isDefaultBranchSet(cwd: string) {\n const { exitCode } = await x('git', ['config', 'init.defaultBranch'], {\n nodeOptions: { cwd },\n });\n\n return exitCode === 0;\n}\n\n/*\nInitialize a Git repo on the project.\n\nBased on https://github.com/vercel/next.js/blob/canary/packages/create-next-app/helpers/git.ts\n*/\nexport async function tryGitInit(cwd: string): Promise<boolean> {\n const { exitCode } = await x('git', ['--version']);\n if (exitCode !== 0) return false;\n\n if (await isInGitRepository(cwd)) return false;\n\n try {\n await x('git', ['init'], {\n throwOnError: true,\n nodeOptions: { cwd },\n });\n\n if (!(await isDefaultBranchSet(cwd))) {\n await x('git', ['checkout', '-b', 'main'], {\n throwOnError: true,\n nodeOptions: {\n cwd,\n },\n });\n }\n\n await x('git', ['add', '-A'], {\n throwOnError: true,\n nodeOptions: {\n cwd,\n },\n });\n\n await x('git', ['commit', '-m', 'Initial commit from Create Fumadocs App'], {\n throwOnError: true,\n nodeOptions: {\n cwd,\n },\n });\n return true;\n } catch {\n await fs.rm(join(cwd, '.git'), { recursive: true, force: true });\n\n return false;\n }\n}\n","import path from 'node:path';\nimport fs from 'node:fs/promises';\nimport { copy, tryGitInit } from '@/utils';\nimport type { PackageManager } from './auto-install';\nimport { autoInstall } from './auto-install';\nimport { depVersions, sourceDir, type TemplateInfo, templates } from './constants';\n\nexport type Template = TemplateInfo['value'];\nexport interface Options {\n outputDir: string;\n template: Template;\n\n /**\n * the package manager to use\n *\n * @defaultValue 'npm'\n */\n packageManager?: PackageManager;\n\n installDeps?: boolean;\n initializeGit?: boolean;\n log?: (message: string) => void;\n plugins?: TemplatePlugin[];\n}\n\nexport interface TemplatePluginContext {\n template: TemplateInfo;\n log: (message: string) => void;\n /**\n * output directory\n */\n dest: string;\n\n /**\n * output directory for app code (e.g. under `/src`)\n */\n appDir: string;\n}\n\nexport type PackageJsonType = {\n name?: string;\n version?: string;\n private?: boolean;\n scripts?: Record<string, string>;\n dependencies?: Record<string, string>;\n devDependencies?: Record<string, string>;\n} & Record<string, unknown>;\n\ntype Awaitable<T> = T | Promise<T>;\n\nexport interface TemplatePlugin {\n template?: (\n this: Pick<TemplatePluginContext, 'dest'>,\n info: TemplateInfo,\n ) => Awaitable<void | TemplateInfo>;\n packageJson?: (\n this: TemplatePluginContext,\n packageJson: PackageJsonType,\n ) => Awaitable<void | PackageJsonType>;\n afterWrite?: (this: TemplatePluginContext) => Awaitable<void>;\n readme?: (this: TemplatePluginContext, content: string) => Awaitable<void | string>;\n}\n\nexport async function create(createOptions: Options): Promise<void> {\n const {\n outputDir,\n plugins = [],\n packageManager = 'npm',\n initializeGit = false,\n installDeps = false,\n log = console.log,\n } = createOptions;\n\n let template = templates.find((item) => item.value === createOptions.template)!;\n for (const plugin of plugins) {\n template = (await plugin.template?.call({ dest: outputDir }, template)) ?? template;\n }\n\n const appDir = path.join(outputDir, template.appDir);\n const projectName = path.basename(outputDir);\n const pluginContext: TemplatePluginContext = {\n template,\n dest: outputDir,\n log,\n appDir,\n };\n\n await copy(path.join(sourceDir, 'template', template.value), outputDir, {\n rename(file) {\n file = file.replace('example.gitignore', '.gitignore');\n\n return template.rename?.(file) ?? file;\n },\n });\n\n const packageJsonPath = path.join(outputDir, 'package.json');\n let packageJson = await initPackageJson(projectName, packageJsonPath);\n for (const plugin of plugins) {\n packageJson = (await plugin.packageJson?.call(pluginContext, packageJson)) ?? packageJson;\n }\n await fs.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2));\n\n const readmePath = path.join(outputDir, 'README.md');\n let readme = `# ${projectName}\\n\\n${await fs.readFile(readmePath)}`;\n for (const plugin of plugins) {\n readme = (await plugin.readme?.call(pluginContext, readme)) ?? readme;\n }\n await fs.writeFile(readmePath, readme);\n\n for (const plugin of plugins) {\n await plugin.afterWrite?.call(pluginContext);\n }\n\n if (installDeps) {\n try {\n await autoInstall(packageManager, outputDir);\n log('Installed dependencies');\n } catch (err) {\n log(`Failed to install dependencies: ${err}`);\n }\n }\n\n if (initializeGit && (await tryGitInit(outputDir))) {\n log('Initialized Git repository');\n }\n}\n\nasync function initPackageJson(\n projectName: string,\n packageJsonPath: string,\n): Promise<PackageJsonType> {\n function replaceWorkspaceDeps(deps: Record<string, string> = {}) {\n for (const k in deps) {\n if (deps[k].startsWith('workspace:') && k in depVersions) {\n deps[k] = depVersions[k as keyof typeof depVersions];\n }\n }\n\n return deps;\n }\n\n const packageJson: PackageJsonType = JSON.parse(await fs.readFile(packageJsonPath, 'utf-8'));\n const dependencies = replaceWorkspaceDeps(packageJson.dependencies);\n const devDependencies = replaceWorkspaceDeps(packageJson.devDependencies);\n const scripts = { ...packageJson.scripts };\n\n return {\n ...packageJson,\n name: projectName,\n scripts,\n dependencies,\n devDependencies,\n };\n}\n"],"mappings":";;;;;AAIA,MAAa,WAAW;CAAC;CAAO;CAAQ;CAAO;AAAM;AAErD,SAAgB,oBAAoC;CAClD,MAAM,YAAY,QAAQ,IAAI,yBAAyB;CAEvD,IAAI,UAAU,WAAW,MAAM,GAC7B,OAAO;CAGT,IAAI,UAAU,WAAW,MAAM,GAC7B,OAAO;CAGT,IAAI,UAAU,WAAW,KAAK,GAC5B,OAAO;CAGT,OAAO;AACT;AAEA,eAAsB,YAAY,SAAyB,MAAc;CACvE,MAAM,EAAE,SAAS,CAAC,SAAS,GAAG;EAC5B,cAAc;EACd,aAAa;GACX,KAAK;IACH,GAAG,QAAQ;IACX,UAAU;IACV,wBAAwB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