Skip to content

Commit 9798922

Browse files
committed
Build project setup page
1 parent 7fbf4c9 commit 9798922

25 files changed

Lines changed: 3084 additions & 246 deletions

core/entrypoint.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,18 @@ export class Entrypoint {
3333
}
3434
parent[leaf] = relpath
3535
}
36+
suggestions.sort((a, b) => a.length - b.length)
37+
3638
return { tree, suggestions }
3739
}
3840

3941
public async getExports(relpath: string) {
4042
try {
4143
const exports = await this.import<any>(path.resolve(relpath))
42-
return Object.keys(exports)
44+
return Object.entries(exports).map(([name, value]) => ({
45+
name,
46+
isDb: value instanceof Database,
47+
}))
4348
} catch (_error) {
4449
return []
4550
}

core/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export type Project = {
2-
db: string
3-
dbs: Record<string, string>
42
entrypoint: string
53
export: string
4+
dburl: string
5+
dbs: Record<string, string>
66
}

package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,19 @@
4646
},
4747
"dependencies": {
4848
"@clack/prompts": "^0.10.0",
49+
"@radix-ui/react-checkbox": "^1.1.4",
50+
"@radix-ui/react-dialog": "^1.1.6",
51+
"@radix-ui/react-dropdown-menu": "^2.1.6",
52+
"@radix-ui/react-menubar": "^1.1.6",
53+
"@radix-ui/react-select": "^2.1.6",
4954
"@radix-ui/react-slot": "^1.1.2",
55+
"@radix-ui/react-tooltip": "^1.1.8",
5056
"@react-router/express": "^7.2.0",
5157
"@react-router/node": "^7.2.0",
5258
"@react-router/serve": "^7.2.0",
5359
"class-variance-authority": "^0.7.1",
5460
"clsx": "^2.1.1",
61+
"cmdk": "1.0.0",
5562
"commandstruct": "^0.3.1",
5663
"compression": "^1.8.0",
5764
"express": "^4.21.2",

0 commit comments

Comments
 (0)