Skip to content

Commit 4a8d212

Browse files
committed
Resolve merge conflicts by accepting release/v0.0.5 versions
1 parent 922ed36 commit 4a8d212

File tree

14 files changed

+707
-2205
lines changed

14 files changed

+707
-2205
lines changed

scaffold-vue/postcss.config.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,4 @@ export default {
33
tailwindcss: {},
44
autoprefixer: {},
55
},
6-
<<<<<<< HEAD
7-
};
8-
=======
9-
}
10-
>>>>>>> release/v0.0.5
6+
}

scaffold-vue/src/App.vue

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,3 @@
1-
<<<<<<< HEAD
2-
<template>
3-
<div class="min-h-screen bg-gray-100 flex items-center justify-center">
4-
<div class="bg-white p-8 rounded-lg shadow-md">
5-
<h1 class="text-2xl font-bold text-gray-800 mb-4">
6-
Welcome to Vue 3 + Vite + TypeScript + Tailwind
7-
</h1>
8-
<p class="text-gray-600">
9-
This is a basic scaffold for your Vue 3 project.
10-
</p>
11-
</div>
12-
</div>
13-
</template>
14-
15-
<script setup lang="ts">
16-
// Your Vue component logic here
17-
</script>
18-
19-
<style scoped>
20-
/* Scoped styles here */
21-
</style>
22-
=======
231
<script setup lang="ts">
242
import HelloWorld from './components/HelloWorld.vue'
253
import TheWelcome from './components/TheWelcome.vue'
@@ -67,4 +45,3 @@ header {
6745
}
6846
}
6947
</style>
70-
>>>>>>> release/v0.0.5

scaffold-vue/src/main.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
1-
<<<<<<< HEAD
2-
import { createApp } from 'vue'
3-
import App from './App.vue'
4-
import './style.css'
5-
6-
createApp(App).mount('#app')
7-
=======
81
import './assets/main.css'
92

103
import { createApp } from 'vue'
114
import App from './App.vue'
125

136
createApp(App).mount('#app')
14-
>>>>>>> release/v0.0.5

scaffold-vue/vite.config.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,3 @@
1-
<<<<<<< HEAD
2-
import { defineConfig } from "vite";
3-
import vue from "@vitejs/plugin-vue";
4-
import path from "path";
5-
6-
export default defineConfig(() => ({
7-
server: {
8-
host: "::",
9-
port: 8080,
10-
},
11-
plugins: [vue()],
12-
resolve: {
13-
alias: {
14-
"@": path.resolve(__dirname, "./src"),
15-
},
16-
},
17-
}));
18-
=======
191
import { fileURLToPath, URL } from 'node:url'
202

213
import { defineConfig } from 'vite'
@@ -34,4 +16,3 @@ export default defineConfig({
3416
},
3517
},
3618
})
37-
>>>>>>> release/v0.0.5

src/app/TitleBar.tsx

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -94,27 +94,9 @@ export const TitleBar = () => {
9494
</Button>
9595
</div>
9696

97-
<<<<<<< HEAD
98-
<img src={logo} alt="AliFullStack Logo" className="w-6 h-6 mr-0.5" />
99-
<Button
100-
data-testid="title-bar-app-name-button"
101-
variant="outline"
102-
size="sm"
103-
className={`hidden @2xl:block no-app-region-drag text-xs max-w-38 truncate font-medium ${
104-
selectedApp ? "cursor-pointer" : ""
105-
}`}
106-
onClick={handleAppClick}
107-
>
108-
{displayText}
109-
</Button>
110-
{isDyadPro && (
111-
<DyadProButton isAliFullStackProEnabled={isAliFullStackProEnabled} />
112-
)}
113-
=======
11497
<div className="flex-1 flex justify-center items-center absolute inset-0 pointer-events-none">
11598
<span className="text-lg font-semibold no-app-region-drag pointer-events-auto">AliFullStack</span>
11699
</div>
117-
>>>>>>> release/v0.0.5
118100

119101
<div className="flex items-center flex-shrink-0 ml-auto">
120102
{isDyadPro && <DyadProButton isAliFullStackProEnabled={isAliFullStackProEnabled} />}

src/hooks/useParseRouter.ts

Lines changed: 10 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -21,35 +21,20 @@ export function useParseRouter(appId: number | null) {
2121
refreshApp,
2222
} = useLoadApp(appId);
2323

24-
// Detect Next.js app by presence of next.config.* in file list
25-
const isNextApp = useMemo(() => {
26-
if (!app?.files) return false;
27-
return app.files.some((f) => f.toLowerCase().includes("next.config"));
28-
}, [app?.files]);
29-
30-
// Detect Vue app by presence of .vue files in src/ or frontend/src/
31-
const isVueApp = useMemo(() => {
32-
if (!app?.files) return false;
33-
return app.files.some((f) => f.includes('.vue'));
34-
}, [app?.files]);
35-
3624
// Load router related file to extract routes for non-Next apps
37-
// For Vue apps, try .vue files; for React/other, try .tsx files
38-
const primaryRouterPath = isVueApp ? "frontend/src/App.vue" : "frontend/src/App.tsx";
39-
const fallbackRouterPath = isVueApp ? "src/App.vue" : "src/App.tsx";
40-
25+
// First try frontend/src/App.tsx (new structure), then fallback to src/App.tsx
4126
const {
4227
content: frontendRouterContent,
4328
loading: frontendRouterFileLoading,
4429
error: frontendRouterFileError,
45-
} = useLoadAppFile(appId, primaryRouterPath);
30+
} = useLoadAppFile(appId, "frontend/src/App.tsx");
4631

4732
const {
4833
content: routerContent,
4934
loading: routerFileLoading,
5035
error: routerFileError,
5136
refreshFile,
52-
} = useLoadAppFile(appId, fallbackRouterPath);
37+
} = useLoadAppFile(appId, "src/App.tsx");
5338

5439
const {
5540
content: vueRouterContent,
@@ -63,8 +48,6 @@ export function useParseRouter(appId: number | null) {
6348
error: vueAppError,
6449
} = useLoadAppFile(appId, "src/App.vue");
6550

66-
<<<<<<< HEAD
67-
=======
6851
// Detect Next.js app by presence of next.config.* in file list
6952
const isNextApp = useMemo(() => {
7053
if (!app?.files) return false;
@@ -82,7 +65,6 @@ export function useParseRouter(appId: number | null) {
8265
const finalRouterLoading = frontendRouterFileLoading || routerFileLoading || (isVueApp ? vueAppLoading : false);
8366
const finalRouterError = frontendRouterFileError || routerFileError || (isVueApp ? vueAppError : false);
8467

85-
>>>>>>> release/v0.0.5
8668
// Parse routes either from Next.js file-based routing or from router file
8769
useEffect(() => {
8870
const buildLabel = (path: string) =>
@@ -176,41 +158,16 @@ export function useParseRouter(appId: number | null) {
176158

177159
try {
178160
const parsedRoutes: ParsedRoute[] = [];
161+
const routePathsRegex = /<Route\s+(?:[^>]*\s+)?path=["']([^"']+)["']/g;
162+
let match: RegExpExecArray | null;
179163

180-
if (isVueApp) {
181-
// For Vue apps, look for route definitions in various formats
182-
// Vue Router routes can be defined in different ways
183-
const vueRouteRegexes = [
184-
// Vue Router createRouter format: path: '/home'
185-
/path:\s*["']([^"']+)["']/g,
186-
// Vue Router route object: { path: '/home' }
187-
/{[^}]*path:\s*["']([^"']+)["'][^}]*}/g,
188-
];
189-
190-
for (const regex of vueRouteRegexes) {
191-
let match: RegExpExecArray | null;
192-
while ((match = regex.exec(content)) !== null) {
193-
const path = match[1];
194-
const label = buildLabel(path);
195-
if (!parsedRoutes.some((r) => r.path === path)) {
196-
parsedRoutes.push({ path, label });
197-
}
198-
}
199-
}
200-
} else {
201-
// React-style route parsing
202-
const routePathsRegex = /<Route\s+(?:[^>]*\s+)?path=["']([^"']+)["']/g;
203-
let match: RegExpExecArray | null;
204-
205-
while ((match = routePathsRegex.exec(content)) !== null) {
206-
const path = match[1];
207-
const label = buildLabel(path);
208-
if (!parsedRoutes.some((r) => r.path === path)) {
209-
parsedRoutes.push({ path, label });
210-
}
164+
while ((match = routePathsRegex.exec(content)) !== null) {
165+
const path = match[1];
166+
const label = buildLabel(path);
167+
if (!parsedRoutes.some((r) => r.path === path)) {
168+
parsedRoutes.push({ path, label });
211169
}
212170
}
213-
214171
setRoutes(parsedRoutes);
215172
} catch (e) {
216173
console.error("Error parsing router file:", e);

0 commit comments

Comments
 (0)