@accept-md/core 4.0.4 → 4.0.6-canary.0
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/types.d.ts +30 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +2 -1
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Route types and metadata for
|
|
2
|
+
* Route types and metadata for framework route detection.
|
|
3
|
+
* Currently supports Next.js (App Router, Pages Router).
|
|
3
4
|
*/
|
|
4
5
|
export type RouterType = 'app' | 'pages';
|
|
6
|
+
/**
|
|
7
|
+
* High-level framework classification for a detected project.
|
|
8
|
+
*
|
|
9
|
+
* - 'next-app' → Next.js project using the App Router
|
|
10
|
+
* - 'next-pages' → Next.js project using the Pages Router
|
|
11
|
+
* - 'sveltekit' → SvelteKit project (file-based routes in routes/ or src/routes/)
|
|
12
|
+
*/
|
|
13
|
+
export type FrameworkType = 'next-app' | 'next-pages' | 'sveltekit';
|
|
5
14
|
export type RouteSegmentType = 'page' | 'layout' | 'loading' | 'error' | 'not-found' | 'template' | 'default' | 'route';
|
|
6
15
|
export type DynamicSegmentType = 'dynamic' | 'catch-all' | 'optional-catch-all';
|
|
7
16
|
export interface RouteSegment {
|
|
@@ -47,6 +56,15 @@ export interface NextMarkdownConfig {
|
|
|
47
56
|
debug?: boolean;
|
|
48
57
|
}
|
|
49
58
|
export interface ProjectDetection {
|
|
59
|
+
/**
|
|
60
|
+
* High-level framework classification for this project.
|
|
61
|
+
* For backward compatibility, this is optional; older callers can continue
|
|
62
|
+
* to use the more specific flags (isNext, routerType, isSvelteKit, etc).
|
|
63
|
+
*/
|
|
64
|
+
framework?: FrameworkType;
|
|
65
|
+
/**
|
|
66
|
+
* Next.js-specific detection.
|
|
67
|
+
*/
|
|
50
68
|
isNext: boolean;
|
|
51
69
|
routerType: RouterType | null;
|
|
52
70
|
hasAppDir: boolean;
|
|
@@ -60,6 +78,17 @@ export interface ProjectDetection {
|
|
|
60
78
|
configPath: string | null;
|
|
61
79
|
/** If in a monorepo: path to a subdirectory whose package.json has "next" (e.g. "apps/web") */
|
|
62
80
|
nextAppPath?: string;
|
|
81
|
+
/**
|
|
82
|
+
* SvelteKit-specific detection.
|
|
83
|
+
*
|
|
84
|
+
* These fields are additive and do not affect existing Next.js behavior.
|
|
85
|
+
*/
|
|
86
|
+
/** Whether the current project looks like a SvelteKit app (has @sveltejs/kit and routes directory). */
|
|
87
|
+
isSvelteKit?: boolean;
|
|
88
|
+
/** Relative path to the SvelteKit routes directory, e.g. 'src/routes' or 'routes'. */
|
|
89
|
+
svelteKitRoutesDir?: string | null;
|
|
90
|
+
/** Optional path to svelte.config.js/ts if present. */
|
|
91
|
+
svelteConfigPath?: string | null;
|
|
63
92
|
/** Whether the project uses TypeScript (tsconfig.json present); used to generate .ts or .js handler */
|
|
64
93
|
hasTypeScript?: boolean;
|
|
65
94
|
/** Whether next.config has accept-md rewrite configuration (preferred over middleware) */
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,OAAO,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,YAAY,GAAG,WAAW,CAAC;AAEpE,MAAM,MAAM,gBAAgB,GACxB,MAAM,GACN,QAAQ,GACR,SAAS,GACT,OAAO,GACP,WAAW,GACX,UAAU,GACV,SAAS,GACT,OAAO,CAAC;AAEZ,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,WAAW,GAAG,oBAAoB,CAAC;AAEhF,MAAM,WAAW,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O,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,8DAA8D;IAC9D,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,oEAAoE;IACpE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,+FAA+F;IAC/F,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,uGAAuG;IACvG,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,sFAAsF;IACtF,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,uDAAuD;IACvD,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC,uGAAuG;IACvG,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,0FAA0F;IAC1F,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB"}
|
package/dist/types.js
CHANGED
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|