@farming-labs/docs 0.0.46 → 0.0.48
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/cli/index.mjs +2 -3
- package/dist/server.mjs +3 -7
- package/package.json +1 -1
package/dist/cli/index.mjs
CHANGED
|
@@ -2504,7 +2504,7 @@ async function init(options = {}) {
|
|
|
2504
2504
|
p.log.step(`Bootstrapping project with ${pc.cyan(`'${projectName}'`)} (${templateLabel})...`);
|
|
2505
2505
|
try {
|
|
2506
2506
|
exec(`npx degit ${EXAMPLES_REPO}/examples/${template} . --force`, targetDir);
|
|
2507
|
-
} catch
|
|
2507
|
+
} catch {
|
|
2508
2508
|
p.log.error("Failed to bootstrap. Check your connection and that the repo exists.");
|
|
2509
2509
|
process.exit(1);
|
|
2510
2510
|
}
|
|
@@ -3068,7 +3068,7 @@ async function init(options = {}) {
|
|
|
3068
3068
|
resolve();
|
|
3069
3069
|
});
|
|
3070
3070
|
});
|
|
3071
|
-
} catch
|
|
3071
|
+
} catch {
|
|
3072
3072
|
const manualCmd = framework === "tanstack-start" ? "npx vite dev" : framework === "sveltekit" ? "npx vite dev" : framework === "astro" ? "npx astro dev" : framework === "nuxt" ? "npx nuxt dev" : "pnpm dev";
|
|
3073
3073
|
p.log.error(`Could not start dev server. Try running manually:
|
|
3074
3074
|
${pc.cyan(manualCmd)}`);
|
|
@@ -3349,7 +3349,6 @@ function scaffoldNuxt(cwd, cfg, globalCssRelPath, write, skipped, written) {
|
|
|
3349
3349
|
write(apiReferenceIndexRoute, nuxtServerApiReferenceRouteTemplate(apiReferenceIndexRoute, cfg.useAlias));
|
|
3350
3350
|
write(apiReferenceCatchAllRoute, nuxtServerApiReferenceRouteTemplate(apiReferenceCatchAllRoute, cfg.useAlias));
|
|
3351
3351
|
}
|
|
3352
|
-
path.join(cwd, "nuxt.config.ts");
|
|
3353
3352
|
if (!fileExists(path.join(cwd, "nuxt.config.ts")) && !fileExists(path.join(cwd, "nuxt.config.js"))) write("nuxt.config.ts", nuxtConfigTemplate(cfg));
|
|
3354
3353
|
const cssTheme = {
|
|
3355
3354
|
fumadocs: "fumadocs",
|
package/dist/server.mjs
CHANGED
|
@@ -246,7 +246,6 @@ function buildApiReferenceRoutes(config, options) {
|
|
|
246
246
|
routePathBase: toRouteBase(apiReference.routeRoot, getNextAppDir(rootDir)),
|
|
247
247
|
isRouteFile: (name) => NEXT_ROUTE_FILE_RE.test(name),
|
|
248
248
|
toRouteSegments: (relativeFile) => relativeFile.split("/").slice(0, -1).filter(Boolean),
|
|
249
|
-
config,
|
|
250
249
|
exclude: apiReference.exclude
|
|
251
250
|
});
|
|
252
251
|
case "sveltekit": return buildFileConventionRoutes({
|
|
@@ -255,7 +254,6 @@ function buildApiReferenceRoutes(config, options) {
|
|
|
255
254
|
routePathBase: toRouteBase(apiReference.routeRoot, "src/routes"),
|
|
256
255
|
isRouteFile: (name) => SVELTE_ROUTE_FILE_RE.test(name),
|
|
257
256
|
toRouteSegments: (relativeFile) => relativeFile.split("/").slice(0, -1).filter(Boolean),
|
|
258
|
-
config,
|
|
259
257
|
exclude: apiReference.exclude
|
|
260
258
|
});
|
|
261
259
|
case "astro": return buildFileConventionRoutes({
|
|
@@ -264,7 +262,6 @@ function buildApiReferenceRoutes(config, options) {
|
|
|
264
262
|
routePathBase: toRouteBase(apiReference.routeRoot, "src/pages"),
|
|
265
263
|
isRouteFile: (name) => ASTRO_ROUTE_FILE_RE.test(name),
|
|
266
264
|
toRouteSegments: (relativeFile) => routeSegmentsFromEndpointFile(relativeFile),
|
|
267
|
-
config,
|
|
268
265
|
exclude: apiReference.exclude
|
|
269
266
|
});
|
|
270
267
|
case "nuxt": return buildFileConventionRoutes({
|
|
@@ -273,14 +270,13 @@ function buildApiReferenceRoutes(config, options) {
|
|
|
273
270
|
routePathBase: toRouteBase(apiReference.routeRoot, "server"),
|
|
274
271
|
isRouteFile: (name) => NUXT_ROUTE_FILE_RE.test(name),
|
|
275
272
|
toRouteSegments: (relativeFile) => routeSegmentsFromEndpointFile(stripNuxtMethodSuffix(relativeFile)),
|
|
276
|
-
config,
|
|
277
273
|
exclude: apiReference.exclude,
|
|
278
274
|
getMethods: (source, file) => extractNuxtMethods(source, file)
|
|
279
275
|
});
|
|
280
|
-
case "tanstack-start": return buildTanstackRoutes(
|
|
276
|
+
case "tanstack-start": return buildTanstackRoutes(rootDir, apiReference);
|
|
281
277
|
}
|
|
282
278
|
}
|
|
283
|
-
function buildFileConventionRoutes({ rootDir, sourceDir, routePathBase, isRouteFile, toRouteSegments,
|
|
279
|
+
function buildFileConventionRoutes({ rootDir, sourceDir, routePathBase, isRouteFile, toRouteSegments, exclude, getMethods = extractMethods }) {
|
|
284
280
|
const files = scanRouteFiles(sourceDir, isRouteFile);
|
|
285
281
|
const routes = [];
|
|
286
282
|
for (const file of files) {
|
|
@@ -301,7 +297,7 @@ function buildFileConventionRoutes({ rootDir, sourceDir, routePathBase, isRouteF
|
|
|
301
297
|
}
|
|
302
298
|
return routes.sort((a, b) => a.routePath.localeCompare(b.routePath));
|
|
303
299
|
}
|
|
304
|
-
function buildTanstackRoutes(
|
|
300
|
+
function buildTanstackRoutes(rootDir, apiReference) {
|
|
305
301
|
const routesDir = join(rootDir, "src", "routes");
|
|
306
302
|
const files = scanRouteFiles(routesDir, (name) => TANSTACK_ROUTE_FILE_RE.test(name));
|
|
307
303
|
const routeBase = `/${normalizePathSegment(apiReference.routeRoot)}`;
|