@seo-partner/adapters 0.0.0-stage → 1.0.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.
Files changed (124) hide show
  1. package/LICENSE +21 -0
  2. package/dist/astro-adapter.d.ts +13 -0
  3. package/dist/astro-adapter.d.ts.map +1 -0
  4. package/dist/astro-adapter.js +95 -0
  5. package/dist/astro-adapter.js.map +1 -0
  6. package/dist/contract.d.ts +21 -0
  7. package/dist/contract.d.ts.map +1 -0
  8. package/dist/contract.js +2 -0
  9. package/dist/contract.js.map +1 -0
  10. package/dist/detector.d.ts +15 -0
  11. package/dist/detector.d.ts.map +1 -0
  12. package/dist/detector.js +40 -0
  13. package/dist/detector.js.map +1 -0
  14. package/dist/django-adapter.d.ts +13 -0
  15. package/dist/django-adapter.d.ts.map +1 -0
  16. package/dist/django-adapter.js +133 -0
  17. package/dist/django-adapter.js.map +1 -0
  18. package/dist/index.d.ts +24 -0
  19. package/dist/index.d.ts.map +1 -0
  20. package/dist/index.js +24 -0
  21. package/dist/index.js.map +1 -0
  22. package/dist/nextjs-adapter.d.ts +15 -0
  23. package/dist/nextjs-adapter.d.ts.map +1 -0
  24. package/dist/nextjs-adapter.js +83 -0
  25. package/dist/nextjs-adapter.js.map +1 -0
  26. package/dist/nuxt-adapter.d.ts +13 -0
  27. package/dist/nuxt-adapter.d.ts.map +1 -0
  28. package/dist/nuxt-adapter.js +88 -0
  29. package/dist/nuxt-adapter.js.map +1 -0
  30. package/dist/parsers/astro-parser.d.ts +8 -0
  31. package/dist/parsers/astro-parser.d.ts.map +1 -0
  32. package/dist/parsers/astro-parser.js +218 -0
  33. package/dist/parsers/astro-parser.js.map +1 -0
  34. package/dist/parsers/dtl-parser.d.ts +7 -0
  35. package/dist/parsers/dtl-parser.d.ts.map +1 -0
  36. package/dist/parsers/dtl-parser.js +143 -0
  37. package/dist/parsers/dtl-parser.js.map +1 -0
  38. package/dist/parsers/html-parser.d.ts +3 -0
  39. package/dist/parsers/html-parser.d.ts.map +1 -0
  40. package/dist/parsers/html-parser.js +195 -0
  41. package/dist/parsers/html-parser.js.map +1 -0
  42. package/dist/parsers/layout-resolver.d.ts +44 -0
  43. package/dist/parsers/layout-resolver.d.ts.map +1 -0
  44. package/dist/parsers/layout-resolver.js +85 -0
  45. package/dist/parsers/layout-resolver.js.map +1 -0
  46. package/dist/parsers/php-route-parser.d.ts +11 -0
  47. package/dist/parsers/php-route-parser.d.ts.map +1 -0
  48. package/dist/parsers/php-route-parser.js +194 -0
  49. package/dist/parsers/php-route-parser.js.map +1 -0
  50. package/dist/parsers/php-template-parser.d.ts +3 -0
  51. package/dist/parsers/php-template-parser.d.ts.map +1 -0
  52. package/dist/parsers/php-template-parser.js +230 -0
  53. package/dist/parsers/php-template-parser.js.map +1 -0
  54. package/dist/parsers/python-url-parser.d.ts +19 -0
  55. package/dist/parsers/python-url-parser.d.ts.map +1 -0
  56. package/dist/parsers/python-url-parser.js +69 -0
  57. package/dist/parsers/python-url-parser.js.map +1 -0
  58. package/dist/parsers/remix-parser.d.ts +3 -0
  59. package/dist/parsers/remix-parser.d.ts.map +1 -0
  60. package/dist/parsers/remix-parser.js +139 -0
  61. package/dist/parsers/remix-parser.js.map +1 -0
  62. package/dist/parsers/robots-sitemap-parser.d.ts +15 -0
  63. package/dist/parsers/robots-sitemap-parser.d.ts.map +1 -0
  64. package/dist/parsers/robots-sitemap-parser.js +100 -0
  65. package/dist/parsers/robots-sitemap-parser.js.map +1 -0
  66. package/dist/parsers/route-normalizer.d.ts +11 -0
  67. package/dist/parsers/route-normalizer.d.ts.map +1 -0
  68. package/dist/parsers/route-normalizer.js +59 -0
  69. package/dist/parsers/route-normalizer.js.map +1 -0
  70. package/dist/parsers/svelte-parser.d.ts +3 -0
  71. package/dist/parsers/svelte-parser.d.ts.map +1 -0
  72. package/dist/parsers/svelte-parser.js +148 -0
  73. package/dist/parsers/svelte-parser.js.map +1 -0
  74. package/dist/parsers/tsx-ast-parser.d.ts +4 -0
  75. package/dist/parsers/tsx-ast-parser.d.ts.map +1 -0
  76. package/dist/parsers/tsx-ast-parser.js +380 -0
  77. package/dist/parsers/tsx-ast-parser.js.map +1 -0
  78. package/dist/parsers/vue-sfc-parser.d.ts +3 -0
  79. package/dist/parsers/vue-sfc-parser.d.ts.map +1 -0
  80. package/dist/parsers/vue-sfc-parser.js +183 -0
  81. package/dist/parsers/vue-sfc-parser.js.map +1 -0
  82. package/dist/php-adapter.d.ts +12 -0
  83. package/dist/php-adapter.d.ts.map +1 -0
  84. package/dist/php-adapter.js +42 -0
  85. package/dist/php-adapter.js.map +1 -0
  86. package/dist/remix-adapter.d.ts +13 -0
  87. package/dist/remix-adapter.d.ts.map +1 -0
  88. package/dist/remix-adapter.js +91 -0
  89. package/dist/remix-adapter.js.map +1 -0
  90. package/dist/static-adapter.d.ts +12 -0
  91. package/dist/static-adapter.d.ts.map +1 -0
  92. package/dist/static-adapter.js +44 -0
  93. package/dist/static-adapter.js.map +1 -0
  94. package/dist/sveltekit-adapter.d.ts +13 -0
  95. package/dist/sveltekit-adapter.d.ts.map +1 -0
  96. package/dist/sveltekit-adapter.js +89 -0
  97. package/dist/sveltekit-adapter.js.map +1 -0
  98. package/package.json +23 -3
  99. package/src/astro-adapter.ts +126 -0
  100. package/src/contract.ts +40 -0
  101. package/src/detector.ts +46 -0
  102. package/src/django-adapter.ts +173 -0
  103. package/src/index.ts +23 -0
  104. package/src/nextjs-adapter.ts +116 -0
  105. package/src/nuxt-adapter.ts +118 -0
  106. package/src/parsers/astro-parser.ts +249 -0
  107. package/src/parsers/dtl-parser.ts +166 -0
  108. package/src/parsers/html-parser.ts +214 -0
  109. package/src/parsers/layout-resolver.ts +112 -0
  110. package/src/parsers/php-route-parser.ts +254 -0
  111. package/src/parsers/php-template-parser.ts +303 -0
  112. package/src/parsers/python-url-parser.ts +92 -0
  113. package/src/parsers/remix-parser.ts +161 -0
  114. package/src/parsers/robots-sitemap-parser.ts +128 -0
  115. package/src/parsers/route-normalizer.ts +70 -0
  116. package/src/parsers/svelte-parser.ts +167 -0
  117. package/src/parsers/tsx-ast-parser.ts +404 -0
  118. package/src/parsers/vue-sfc-parser.ts +207 -0
  119. package/src/php-adapter.ts +68 -0
  120. package/src/remix-adapter.ts +123 -0
  121. package/src/static-adapter.ts +62 -0
  122. package/src/sveltekit-adapter.ts +119 -0
  123. package/tsconfig.json +9 -0
  124. package/README.md +0 -3
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Firinze Gbènito Dossou (Leadbooster)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,13 @@
1
+ import type { DiscoveredRoute, ExtractedRouteData } from '@seo-partner/core';
2
+ import type { AdapterCapabilities, AdapterVersion, FrameworkAdapter } from './contract.js';
3
+ export declare class AstroAdapter implements FrameworkAdapter {
4
+ readonly id = "astro";
5
+ readonly name = "Astro";
6
+ readonly version: AdapterVersion;
7
+ readonly capabilities: AdapterCapabilities;
8
+ private readonly layoutResolver;
9
+ detect(projectRoot: string, filePaths: ReadonlyArray<string>, contentsByPath: ReadonlyMap<string, string>): Promise<boolean>;
10
+ discoverRoutes(projectRoot: string, filePaths: ReadonlyArray<string>, contentsByPath: ReadonlyMap<string, string>, sitemapPaths: ReadonlySet<string>): Promise<ReadonlyArray<DiscoveredRoute>>;
11
+ extractRoute(projectRoot: string, route: DiscoveredRoute, fileContent: string): Promise<ExtractedRouteData>;
12
+ }
13
+ //# sourceMappingURL=astro-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"astro-adapter.d.ts","sourceRoot":"","sources":["../src/astro-adapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAK3F,qBAAa,YAAa,YAAW,gBAAgB;IACnD,SAAgB,EAAE,WAAW;IAC7B,SAAgB,IAAI,WAAW;IAC/B,SAAgB,OAAO,EAAE,cAAc,CAAS;IAChD,SAAgB,YAAY,EAAE,mBAAmB,CAQ/C;IAEF,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAwB;IAE1C,MAAM,CACjB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,EAChC,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAC1C,OAAO,CAAC,OAAO,CAAC;IAqBN,cAAc,CACzB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,EAChC,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EAC3C,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,GAChC,OAAO,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;IAoD7B,YAAY,CACvB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,eAAe,EACtB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,kBAAkB,CAAC;CAe/B"}
@@ -0,0 +1,95 @@
1
+ import { parseAstroOrMarkdown } from './parsers/astro-parser.js';
2
+ import { normalizeRoutePattern } from './parsers/route-normalizer.js';
3
+ import { LayoutResolver } from './parsers/layout-resolver.js';
4
+ export class AstroAdapter {
5
+ id = 'astro';
6
+ name = 'Astro';
7
+ version = '1.0';
8
+ capabilities = {
9
+ routes: true,
10
+ metadata: true,
11
+ headings: true,
12
+ internalLinks: true,
13
+ jsonLd: true,
14
+ images: true,
15
+ robotsAndSitemap: true,
16
+ };
17
+ layoutResolver = new LayoutResolver();
18
+ async detect(projectRoot, filePaths, contentsByPath) {
19
+ for (const filePath of filePaths) {
20
+ const normalized = filePath.replace(/\\/g, '/');
21
+ if (normalized === 'astro.config.mjs' ||
22
+ normalized === 'astro.config.ts' ||
23
+ normalized === 'astro.config.js' ||
24
+ normalized === 'astro.config.cjs') {
25
+ return true;
26
+ }
27
+ if (normalized === 'package.json') {
28
+ const content = contentsByPath.get(filePath) ?? '';
29
+ if (content.includes('"astro"') || content.includes('"@astrojs/')) {
30
+ return true;
31
+ }
32
+ }
33
+ }
34
+ return false;
35
+ }
36
+ async discoverRoutes(projectRoot, filePaths, contentsByPath, sitemapPaths) {
37
+ const routes = [];
38
+ // Pre-cache layouts from src/layouts/**
39
+ for (const filePath of filePaths) {
40
+ const normalized = filePath.replace(/\\/g, '/');
41
+ if (normalized.startsWith('src/layouts/') && normalized.endsWith('.astro')) {
42
+ const content = contentsByPath.get(filePath) ?? '';
43
+ const parsed = parseAstroOrMarkdown({
44
+ pattern: '',
45
+ filePath,
46
+ routerKind: 'astro',
47
+ renderingMode: 'static',
48
+ isPrivate: false,
49
+ inSitemap: false,
50
+ }, content);
51
+ this.layoutResolver.registerLayout({
52
+ filePath,
53
+ htmlLang: parsed.routeData.htmlLang,
54
+ title: parsed.routeData.title,
55
+ description: parsed.routeData.description,
56
+ canonical: parsed.routeData.canonical,
57
+ robots: parsed.routeData.robots,
58
+ });
59
+ }
60
+ }
61
+ for (const filePath of filePaths) {
62
+ const normalized = filePath.replace(/\\/g, '/');
63
+ if (!normalized.startsWith('src/pages/'))
64
+ continue;
65
+ if (!/\.(astro|md|mdx|html)$/i.test(normalized))
66
+ continue;
67
+ const relativeInsidePages = normalized.slice('src/pages/'.length);
68
+ const pattern = normalizeRoutePattern(relativeInsidePages, 'astro');
69
+ const inSitemap = sitemapPaths.has(pattern);
70
+ routes.push({
71
+ pattern,
72
+ filePath,
73
+ routerKind: 'astro',
74
+ renderingMode: 'static',
75
+ isPrivate: false,
76
+ inSitemap,
77
+ });
78
+ }
79
+ return routes;
80
+ }
81
+ async extractRoute(projectRoot, route, fileContent) {
82
+ const parsed = parseAstroOrMarkdown(route, fileContent);
83
+ let extracted = parsed.routeData;
84
+ // Apply layout inheritance: check layout candidates
85
+ const layoutCandidates = [
86
+ 'src/layouts/BaseLayout.astro',
87
+ 'src/layouts/Layout.astro',
88
+ 'src/layouts/MainLayout.astro',
89
+ 'src/layouts/DefaultLayout.astro',
90
+ ];
91
+ extracted = this.layoutResolver.applyInheritance(extracted, layoutCandidates);
92
+ return extracted;
93
+ }
94
+ }
95
+ //# sourceMappingURL=astro-adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"astro-adapter.js","sourceRoot":"","sources":["../src/astro-adapter.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,MAAM,OAAO,YAAY;IACP,EAAE,GAAG,OAAO,CAAC;IACb,IAAI,GAAG,OAAO,CAAC;IACf,OAAO,GAAmB,KAAK,CAAC;IAChC,YAAY,GAAwB;QAClD,MAAM,EAAE,IAAI;QACZ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gBACvB,SAAS,EAAE,KAAK;gBAChB,SAAS;aACV,CAAC,CAAC;QACL,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAEM,KAAK,CAAC,YAAY,CACvB,WAAmB,EACnB,KAAsB,EACtB,WAAmB;QAEnB,MAAM,MAAM,GAAG,oBAAoB,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QACxD,IAAI,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;QAEjC,oDAAoD;QACpD,MAAM,gBAAgB,GAAG;YACvB,8BAA8B;YAC9B,0BAA0B;YAC1B,8BAA8B;YAC9B,iCAAiC;SAClC,CAAC;QACF,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;QAE9E,OAAO,SAAS,CAAC;IACnB,CAAC;CACF"}
@@ -0,0 +1,21 @@
1
+ import type { DiscoveredRoute, ExtractedRouteData } from '@seo-partner/core';
2
+ export type AdapterVersion = '1.0';
3
+ export interface AdapterCapabilities {
4
+ readonly routes: boolean;
5
+ readonly metadata: boolean;
6
+ readonly headings: boolean;
7
+ readonly internalLinks: boolean;
8
+ readonly jsonLd: boolean;
9
+ readonly images: boolean;
10
+ readonly robotsAndSitemap: boolean;
11
+ }
12
+ export interface FrameworkAdapter {
13
+ readonly id: string;
14
+ readonly name: string;
15
+ readonly version: AdapterVersion;
16
+ readonly capabilities: AdapterCapabilities;
17
+ detect(projectRoot: string, filePaths: ReadonlyArray<string>, contentsByPath: ReadonlyMap<string, string>): Promise<boolean>;
18
+ discoverRoutes(projectRoot: string, filePaths: ReadonlyArray<string>, contentsByPath: ReadonlyMap<string, string>, sitemapPaths: ReadonlySet<string>): Promise<ReadonlyArray<DiscoveredRoute>>;
19
+ extractRoute(projectRoot: string, route: DiscoveredRoute, fileContent: string): Promise<ExtractedRouteData>;
20
+ }
21
+ //# sourceMappingURL=contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract.d.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ChC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=contract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ import type { FrameworkAdapter } from './contract.js';
2
+ /**
3
+ * Detection order contract (strictly prioritized to avoid ambiguities):
4
+ * 1. Next.js
5
+ * 2. Astro
6
+ * 3. Nuxt 3
7
+ * 4. SvelteKit
8
+ * 5. Remix / React Router v7
9
+ * 6. PHP (Laravel / Symfony / Native)
10
+ * 7. Django (Python)
11
+ * 8. Static HTML
12
+ */
13
+ export declare const BUILTIN_ADAPTERS: ReadonlyArray<FrameworkAdapter>;
14
+ export declare function detectActiveAdapters(projectRoot: string, filePaths: ReadonlyArray<string>, contentsByPath: ReadonlyMap<string, string>): Promise<ReadonlyArray<FrameworkAdapter>>;
15
+ //# sourceMappingURL=detector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detector.d.ts","sourceRoot":"","sources":["../src/detector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAUtD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,EAAE,aAAa,CAAC,gBAAgB,CAS5D,CAAC;AAEF,wBAAsB,oBAAoB,CACxC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,EAChC,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAC1C,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAS1C"}
@@ -0,0 +1,40 @@
1
+ import { NextJsAdapter } from './nextjs-adapter.js';
2
+ import { AstroAdapter } from './astro-adapter.js';
3
+ import { NuxtAdapter } from './nuxt-adapter.js';
4
+ import { SvelteKitAdapter } from './sveltekit-adapter.js';
5
+ import { RemixAdapter } from './remix-adapter.js';
6
+ import { PhpAdapter } from './php-adapter.js';
7
+ import { DjangoAdapter } from './django-adapter.js';
8
+ import { StaticAdapter } from './static-adapter.js';
9
+ /**
10
+ * Detection order contract (strictly prioritized to avoid ambiguities):
11
+ * 1. Next.js
12
+ * 2. Astro
13
+ * 3. Nuxt 3
14
+ * 4. SvelteKit
15
+ * 5. Remix / React Router v7
16
+ * 6. PHP (Laravel / Symfony / Native)
17
+ * 7. Django (Python)
18
+ * 8. Static HTML
19
+ */
20
+ export const BUILTIN_ADAPTERS = [
21
+ new NextJsAdapter(),
22
+ new AstroAdapter(),
23
+ new NuxtAdapter(),
24
+ new SvelteKitAdapter(),
25
+ new RemixAdapter(),
26
+ new PhpAdapter(),
27
+ new DjangoAdapter(),
28
+ new StaticAdapter(),
29
+ ];
30
+ export async function detectActiveAdapters(projectRoot, filePaths, contentsByPath) {
31
+ const active = [];
32
+ for (const adapter of BUILTIN_ADAPTERS) {
33
+ const matched = await adapter.detect(projectRoot, filePaths, contentsByPath);
34
+ if (matched) {
35
+ active.push(adapter);
36
+ }
37
+ }
38
+ return active;
39
+ }
40
+ //# sourceMappingURL=detector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detector.js","sourceRoot":"","sources":["../src/detector.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAoC;IAC/D,IAAI,aAAa,EAAE;IACnB,IAAI,YAAY,EAAE;IAClB,IAAI,WAAW,EAAE;IACjB,IAAI,gBAAgB,EAAE;IACtB,IAAI,YAAY,EAAE;IAClB,IAAI,UAAU,EAAE;IAChB,IAAI,aAAa,EAAE;IACnB,IAAI,aAAa,EAAE;CACpB,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,WAAmB,EACnB,SAAgC,EAChC,cAA2C;IAE3C,MAAM,MAAM,GAAuB,EAAE,CAAC;IACtC,KAAK,MAAM,OAAO,IAAI,gBAAgB,EAAE,CAAC;QACvC,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC;QAC7E,IAAI,OAAO,EAAE,CAAC;YACZ,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { DiscoveredRoute, ExtractedRouteData } from '@seo-partner/core';
2
+ import type { AdapterCapabilities, AdapterVersion, FrameworkAdapter } from './contract.js';
3
+ export declare class DjangoAdapter implements FrameworkAdapter {
4
+ readonly id = "django";
5
+ readonly name = "Django";
6
+ readonly version: AdapterVersion;
7
+ readonly capabilities: AdapterCapabilities;
8
+ private readonly layoutResolver;
9
+ detect(projectRoot: string, filePaths: ReadonlyArray<string>, contentsByPath: ReadonlyMap<string, string>): Promise<boolean>;
10
+ discoverRoutes(projectRoot: string, filePaths: ReadonlyArray<string>, contentsByPath: ReadonlyMap<string, string>, sitemapPaths: ReadonlySet<string>): Promise<ReadonlyArray<DiscoveredRoute>>;
11
+ extractRoute(projectRoot: string, route: DiscoveredRoute, fileContent: string): Promise<ExtractedRouteData>;
12
+ }
13
+ //# sourceMappingURL=django-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"django-adapter.d.ts","sourceRoot":"","sources":["../src/django-adapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAK3F,qBAAa,aAAc,YAAW,gBAAgB;IACpD,SAAgB,EAAE,YAAY;IAC9B,SAAgB,IAAI,YAAY;IAChC,SAAgB,OAAO,EAAE,cAAc,CAAS;IAChD,SAAgB,YAAY,EAAE,mBAAmB,CAQ/C;IAEF,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAwB;IAE1C,MAAM,CACjB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,EAChC,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAC1C,OAAO,CAAC,OAAO,CAAC;IAkBN,cAAc,CACzB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,EAChC,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EAC3C,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,GAChC,OAAO,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;IAoG7B,YAAY,CACvB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,eAAe,EACtB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,kBAAkB,CAAC;CAiB/B"}
@@ -0,0 +1,133 @@
1
+ import { parseDjangoUrls, parseDjangoViews } from './parsers/python-url-parser.js';
2
+ import { parseDjangoTemplate } from './parsers/dtl-parser.js';
3
+ import { LayoutResolver } from './parsers/layout-resolver.js';
4
+ export class DjangoAdapter {
5
+ id = 'django';
6
+ name = 'Django';
7
+ version = '1.0';
8
+ capabilities = {
9
+ routes: true,
10
+ metadata: true,
11
+ headings: true,
12
+ internalLinks: true,
13
+ jsonLd: true,
14
+ images: true,
15
+ robotsAndSitemap: true,
16
+ };
17
+ layoutResolver = new LayoutResolver();
18
+ async detect(projectRoot, filePaths, contentsByPath) {
19
+ for (const filePath of filePaths) {
20
+ const normalized = filePath.replace(/\\/g, '/');
21
+ if (normalized === 'manage.py' ||
22
+ normalized.endsWith('/manage.py') ||
23
+ normalized === 'wsgi.py' ||
24
+ normalized.endsWith('/wsgi.py') ||
25
+ normalized === 'asgi.py' ||
26
+ normalized.endsWith('/asgi.py') ||
27
+ normalized.endsWith('settings.py')) {
28
+ return true;
29
+ }
30
+ }
31
+ return false;
32
+ }
33
+ async discoverRoutes(projectRoot, filePaths, contentsByPath, sitemapPaths) {
34
+ const routes = [];
35
+ // 1. Pre-cache all base templates (e.g. templates/base.html, templates/*/base.html)
36
+ for (const filePath of filePaths) {
37
+ const normalized = filePath.replace(/\\/g, '/');
38
+ if (normalized.endsWith('.html')) {
39
+ const content = contentsByPath.get(filePath) ?? '';
40
+ if (normalized.endsWith('base.html') ||
41
+ content.includes('<!DOCTYPE html>') ||
42
+ content.includes('<html')) {
43
+ const parsed = parseDjangoTemplate({
44
+ pattern: '',
45
+ filePath,
46
+ routerKind: 'django',
47
+ renderingMode: 'dynamic',
48
+ isPrivate: false,
49
+ inSitemap: false,
50
+ }, content);
51
+ this.layoutResolver.registerLayout({
52
+ filePath,
53
+ htmlLang: parsed.routeData.htmlLang,
54
+ title: parsed.routeData.title,
55
+ description: parsed.routeData.description,
56
+ canonical: parsed.routeData.canonical,
57
+ robots: parsed.routeData.robots,
58
+ });
59
+ }
60
+ }
61
+ }
62
+ // 2. Parse all views.py to build viewName -> templateName mapping
63
+ const viewToTemplate = new Map();
64
+ for (const filePath of filePaths) {
65
+ const normalized = filePath.replace(/\\/g, '/');
66
+ if (normalized.endsWith('views.py')) {
67
+ const content = contentsByPath.get(filePath) ?? '';
68
+ const mappings = parseDjangoViews(content);
69
+ for (const m of mappings) {
70
+ viewToTemplate.set(m.viewName, m.templateName);
71
+ }
72
+ }
73
+ }
74
+ // 3. Parse all urls.py to discover routes
75
+ for (const filePath of filePaths) {
76
+ const normalized = filePath.replace(/\\/g, '/');
77
+ if (!normalized.endsWith('urls.py'))
78
+ continue;
79
+ const content = contentsByPath.get(filePath) ?? '';
80
+ const patterns = parseDjangoUrls(content);
81
+ for (const p of patterns) {
82
+ const targetTemplateName = viewToTemplate.get(p.viewName);
83
+ let resolvedFilePath = filePath;
84
+ if (targetTemplateName) {
85
+ // Find matching template in filePaths
86
+ const found = filePaths.find((fp) => {
87
+ const norm = fp.replace(/\\/g, '/');
88
+ return norm.endsWith(`/${targetTemplateName}`) || norm === targetTemplateName;
89
+ });
90
+ if (found) {
91
+ resolvedFilePath = found;
92
+ }
93
+ }
94
+ else {
95
+ // Conventional fallback: check for templates/<viewName>.html
96
+ const fallback = filePaths.find((fp) => {
97
+ const norm = fp.replace(/\\/g, '/');
98
+ return (norm.endsWith(`/${p.viewName}.html`) ||
99
+ norm.endsWith(`templates/${p.viewName}.html`));
100
+ });
101
+ if (fallback) {
102
+ resolvedFilePath = fallback;
103
+ }
104
+ }
105
+ const inSitemap = sitemapPaths.has(p.pattern) || sitemapPaths.has(`${p.pattern}/`);
106
+ routes.push({
107
+ pattern: p.pattern,
108
+ filePath: resolvedFilePath,
109
+ routerKind: 'django',
110
+ renderingMode: 'dynamic',
111
+ isPrivate: false,
112
+ inSitemap,
113
+ });
114
+ }
115
+ }
116
+ return routes;
117
+ }
118
+ async extractRoute(projectRoot, route, fileContent) {
119
+ const parsed = parseDjangoTemplate(route, fileContent);
120
+ let extracted = parsed.routeData;
121
+ // Resolve base template inheritance
122
+ const candidates = [];
123
+ if (parsed.extendsTemplate) {
124
+ candidates.push(parsed.extendsTemplate);
125
+ candidates.push(`templates/${parsed.extendsTemplate}`);
126
+ }
127
+ candidates.push('templates/base.html');
128
+ candidates.push('base.html');
129
+ extracted = this.layoutResolver.applyInheritance(extracted, candidates);
130
+ return extracted;
131
+ }
132
+ }
133
+ //# sourceMappingURL=django-adapter.js.map
@@ -0,0 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C3B,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;YACxC,UAAU,CAAC,IAAI,CAAC,aAAa,MAAM,CAAC,eAAe,EAAE,CAAC,CAAC;QACzD,CAAC;QACD,UAAU,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QACvC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAE7B,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;QAExE,OAAO,SAAS,CAAC;IACnB,CAAC;CACF"}
@@ -0,0 +1,24 @@
1
+ export * from './contract.js';
2
+ export * from './detector.js';
3
+ export * from './nextjs-adapter.js';
4
+ export * from './astro-adapter.js';
5
+ export * from './nuxt-adapter.js';
6
+ export * from './sveltekit-adapter.js';
7
+ export * from './remix-adapter.js';
8
+ export * from './django-adapter.js';
9
+ export * from './php-adapter.js';
10
+ export * from './static-adapter.js';
11
+ export * from './parsers/tsx-ast-parser.js';
12
+ export * from './parsers/html-parser.js';
13
+ export * from './parsers/astro-parser.js';
14
+ export * from './parsers/vue-sfc-parser.js';
15
+ export * from './parsers/svelte-parser.js';
16
+ export * from './parsers/remix-parser.js';
17
+ export * from './parsers/python-url-parser.js';
18
+ export * from './parsers/dtl-parser.js';
19
+ export * from './parsers/php-route-parser.js';
20
+ export * from './parsers/php-template-parser.js';
21
+ export * from './parsers/robots-sitemap-parser.js';
22
+ export * from './parsers/route-normalizer.js';
23
+ export * from './parsers/layout-resolver.js';
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,24 @@
1
+ export * from './contract.js';
2
+ export * from './detector.js';
3
+ export * from './nextjs-adapter.js';
4
+ export * from './astro-adapter.js';
5
+ export * from './nuxt-adapter.js';
6
+ export * from './sveltekit-adapter.js';
7
+ export * from './remix-adapter.js';
8
+ export * from './django-adapter.js';
9
+ export * from './php-adapter.js';
10
+ export * from './static-adapter.js';
11
+ export * from './parsers/tsx-ast-parser.js';
12
+ export * from './parsers/html-parser.js';
13
+ export * from './parsers/astro-parser.js';
14
+ export * from './parsers/vue-sfc-parser.js';
15
+ export * from './parsers/svelte-parser.js';
16
+ export * from './parsers/remix-parser.js';
17
+ export * from './parsers/python-url-parser.js';
18
+ export * from './parsers/dtl-parser.js';
19
+ export * from './parsers/php-route-parser.js';
20
+ export * from './parsers/php-template-parser.js';
21
+ export * from './parsers/robots-sitemap-parser.js';
22
+ export * from './parsers/route-normalizer.js';
23
+ export * from './parsers/layout-resolver.js';
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { DiscoveredRoute, ExtractedRouteData } from '@seo-partner/core';
2
+ import type { AdapterCapabilities, FrameworkAdapter } from './contract.js';
3
+ export declare function isPrivateRoutePattern(pattern: string): boolean;
4
+ export declare function appRouterPathToPattern(relPath: string): string;
5
+ export declare function pagesRouterPathToPattern(relPath: string): string;
6
+ export declare class NextJsAdapter implements FrameworkAdapter {
7
+ readonly id = "nextjs";
8
+ readonly name = "Next.js (App Router & Pages Router)";
9
+ readonly version: "1.0";
10
+ readonly capabilities: AdapterCapabilities;
11
+ detect(_projectRoot: string, filePaths: ReadonlyArray<string>, contentsByPath: ReadonlyMap<string, string>): Promise<boolean>;
12
+ discoverRoutes(_projectRoot: string, filePaths: ReadonlyArray<string>, contentsByPath: ReadonlyMap<string, string>, sitemapPaths: ReadonlySet<string>): Promise<ReadonlyArray<DiscoveredRoute>>;
13
+ extractRoute(_projectRoot: string, route: DiscoveredRoute, fileContent: string): Promise<ExtractedRouteData>;
14
+ }
15
+ //# sourceMappingURL=nextjs-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nextjs-adapter.d.ts","sourceRoot":"","sources":["../src/nextjs-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAQ3E,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAK9D;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAO9D;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAMhE;AAED,qBAAa,aAAc,YAAW,gBAAgB;IACpD,SAAgB,EAAE,YAAY;IAC9B,SAAgB,IAAI,yCAAyC;IAC7D,SAAgB,OAAO,EAAG,KAAK,CAAU;IACzC,SAAgB,YAAY,EAAE,mBAAmB,CAQ/C;IAEW,MAAM,CACjB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,EAChC,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAC1C,OAAO,CAAC,OAAO,CAAC;IAaN,cAAc,CACzB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,EAChC,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EAC3C,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,GAChC,OAAO,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;IAsC7B,YAAY,CACvB,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,eAAe,EACtB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,kBAAkB,CAAC;CAG/B"}
@@ -0,0 +1,83 @@
1
+ import { detectRenderingModeFromTsx, parseTsxRouteFile, } from './parsers/tsx-ast-parser.js';
2
+ const PRIVATE_ROUTE_PREFIXES = ['/admin', '/dashboard', '/login', '/auth', '/api', '/account'];
3
+ export function isPrivateRoutePattern(pattern) {
4
+ const lower = pattern.toLowerCase();
5
+ return PRIVATE_ROUTE_PREFIXES.some((prefix) => lower === prefix || lower.startsWith(`${prefix}/`));
6
+ }
7
+ export function appRouterPathToPattern(relPath) {
8
+ const withoutPrefix = relPath.replace(/^(src\/)?app\//, '');
9
+ const withoutPage = withoutPrefix.replace(/\/?page\.(tsx|ts|jsx|js|mdx)$/, '');
10
+ const segments = withoutPage
11
+ .split('/')
12
+ .filter((s) => s.length > 0 && !(s.startsWith('(') && s.endsWith(')')));
13
+ return segments.length === 0 ? '/' : `/${segments.join('/')}`;
14
+ }
15
+ export function pagesRouterPathToPattern(relPath) {
16
+ const withoutPrefix = relPath.replace(/^(src\/)?pages\//, '');
17
+ const withoutExt = withoutPrefix.replace(/\.(tsx|ts|jsx|js)$/, '');
18
+ if (withoutExt === 'index')
19
+ return '/';
20
+ const cleaned = withoutExt.replace(/\/index$/, '');
21
+ return `/${cleaned}`;
22
+ }
23
+ export class NextJsAdapter {
24
+ id = 'nextjs';
25
+ name = 'Next.js (App Router & Pages Router)';
26
+ version = '1.0';
27
+ capabilities = {
28
+ routes: true,
29
+ metadata: true,
30
+ headings: true,
31
+ internalLinks: true,
32
+ jsonLd: true,
33
+ images: true,
34
+ robotsAndSitemap: true,
35
+ };
36
+ async detect(_projectRoot, filePaths, contentsByPath) {
37
+ const pkgJson = contentsByPath.get('package.json');
38
+ if (pkgJson && /"next"\s*:/.test(pkgJson)) {
39
+ return true;
40
+ }
41
+ return filePaths.some((p) => /^next\.config\.(js|mjs|ts|cjs)$/.test(p) ||
42
+ /^(src\/)?app\/.*page\.(tsx|ts|jsx|js)$/.test(p) ||
43
+ /^(src\/)?pages\/.*\.(tsx|ts|jsx|js)$/.test(p));
44
+ }
45
+ async discoverRoutes(_projectRoot, filePaths, contentsByPath, sitemapPaths) {
46
+ const routes = [];
47
+ for (const filePath of filePaths) {
48
+ if (/^(src\/)?app\/(.*\/)?page\.(tsx|ts|jsx|js)$/.test(filePath)) {
49
+ const pattern = appRouterPathToPattern(filePath);
50
+ const content = contentsByPath.get(filePath) ?? '';
51
+ routes.push({
52
+ pattern,
53
+ filePath,
54
+ routerKind: 'nextjs-app',
55
+ renderingMode: detectRenderingModeFromTsx(content),
56
+ isPrivate: isPrivateRoutePattern(pattern),
57
+ inSitemap: sitemapPaths.has(pattern),
58
+ });
59
+ }
60
+ else if (/^(src\/)?pages\/.*\.(tsx|ts|jsx|js)$/.test(filePath) &&
61
+ !/\/_app\./.test(filePath) &&
62
+ !/\/_document\./.test(filePath) &&
63
+ !/\/_error\./.test(filePath) &&
64
+ !/^(src\/)?pages\/api\//.test(filePath)) {
65
+ const pattern = pagesRouterPathToPattern(filePath);
66
+ const content = contentsByPath.get(filePath) ?? '';
67
+ routes.push({
68
+ pattern,
69
+ filePath,
70
+ routerKind: 'nextjs-pages',
71
+ renderingMode: detectRenderingModeFromTsx(content),
72
+ isPrivate: isPrivateRoutePattern(pattern),
73
+ inSitemap: sitemapPaths.has(pattern),
74
+ });
75
+ }
76
+ }
77
+ return routes;
78
+ }
79
+ async extractRoute(_projectRoot, route, fileContent) {
80
+ return parseTsxRouteFile(route, fileContent);
81
+ }
82
+ }
83
+ //# sourceMappingURL=nextjs-adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nextjs-adapter.js","sourceRoot":"","sources":["../src/nextjs-adapter.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,0BAA0B,EAC1B,iBAAiB,GAClB,MAAM,6BAA6B,CAAC;AAErC,MAAM,sBAAsB,GAAG,CAAC,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;AAE/F,MAAM,UAAU,qBAAqB,CAAC,OAAe;IACnD,MAAM,KAAK,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IACpC,OAAO,sBAAsB,CAAC,IAAI,CAChC,CAAC,MAAM,EAAE,EAAE,CAAC,KAA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C,CAAC;YACL,CAAC;iBAAM,IACL,sCAAsC,CAAC,IAAI,CAAC,QAAQ,CAAC;gBACrD,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC;gBAC1B,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC;gBAC/B,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC;gBAC5B,CAAC,uBAAuB,CAAC,IAAI,CAAC,QAAQ,CAAC,EACvC,CAAC;gBACD,MAAM,OAAO,GAAG,wBAAwB,CAAC,QAAQ,CAAC,CAAC;gBACnD,MAAM,OAAO,GAAG,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;gBACnD,MAAM,CAAC,IAAI,CAAC;oBACV,OAAO;oBACP,QAAQ;oBACR,UAAU,EAAE,cAAc;oBAC1B,aAAa,EAAE,0BAA0B,CAAC,OAAO,CAAC;oBAClD,SAAS,EAAE,qBAAqB,CAAC,OAAO,CAAC;oBACzC,SAAS,EAAE,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC;iBACrC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAEM,KAAK,CAAC,YAAY,CACvB,YAAoB,EACpB,KAAsB,EACtB,WAAmB;QAEnB,OAAO,iBAAiB,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;IAC/C,CAAC;CACF"}
@@ -0,0 +1,13 @@
1
+ import type { DiscoveredRoute, ExtractedRouteData } from '@seo-partner/core';
2
+ import type { AdapterCapabilities, AdapterVersion, FrameworkAdapter } from './contract.js';
3
+ export declare class NuxtAdapter implements FrameworkAdapter {
4
+ readonly id = "nuxt";
5
+ readonly name = "Nuxt 3";
6
+ readonly version: AdapterVersion;
7
+ readonly capabilities: AdapterCapabilities;
8
+ private readonly layoutResolver;
9
+ detect(projectRoot: string, filePaths: ReadonlyArray<string>, contentsByPath: ReadonlyMap<string, string>): Promise<boolean>;
10
+ discoverRoutes(projectRoot: string, filePaths: ReadonlyArray<string>, contentsByPath: ReadonlyMap<string, string>, sitemapPaths: ReadonlySet<string>): Promise<ReadonlyArray<DiscoveredRoute>>;
11
+ extractRoute(projectRoot: string, route: DiscoveredRoute, fileContent: string): Promise<ExtractedRouteData>;
12
+ }
13
+ //# sourceMappingURL=nuxt-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nuxt-adapter.d.ts","sourceRoot":"","sources":["../src/nuxt-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAK3F,qBAAa,WAAY,YAAW,gBAAgB;IAClD,SAAgB,EAAE,UAAU;IAC5B,SAAgB,IAAI,YAAY;IAChC,SAAgB,OAAO,EAAE,cAAc,CAAS;IAChD,SAAgB,YAAY,EAAE,mBAAmB,CAQ/C;IAEF,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAwB;IAE1C,MAAM,CACjB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,EAChC,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAC1C,OAAO,CAAC,OAAO,CAAC;IAoBN,cAAc,CACzB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,EAChC,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EAC3C,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,GAChC,OAAO,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;IAoD7B,YAAY,CACvB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,eAAe,EACtB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,kBAAkB,CAAC;CAS/B"}