Skip to content

Commit d335de1

Browse files
committed
checkpoint
1 parent 4f512f0 commit d335de1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2334
-1248
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ test-results
3232
.claude/CLAUDE.md
3333
.eslintcache
3434
.tsbuildinfo
35+
src/routeTree.gen.ts

package.json

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@
66
"packageManager": "pnpm@10.26.0",
77
"type": "module",
88
"scripts": {
9-
"dev": "pnpm run with-env vite dev",
9+
"dev": "pnpm link ../cli/packages/cli && pnpm run with-env vite dev",
1010
"with-env": "dotenv -e ../../.env",
1111
"dev:frontend": "pnpm run with-env vite dev",
1212
"build": "vite build && cp src/instrument.server.mjs dist/server",
1313
"start": "vite start",
1414
"lint": "eslint --cache --ext .ts,.tsx ./src",
1515
"format": "prettier --experimental-cli --ignore-unknown '**/*' --write",
16-
"linkAll": "node scripts/link.js",
1716
"db:generate": "drizzle-kit generate",
1817
"db:migrate": "drizzle-kit migrate",
1918
"db:push": "drizzle-kit push",
@@ -159,18 +158,8 @@
159158
"qs": ">=6.14.1",
160159
"js-yaml": "^3.14.2",
161160
"brace-expansion": ">=1.1.12",
162-
"unicorn-magic": "^0.4.0"
163-
}
164-
},
165-
"_pnpm": {
166-
"overrides": {
167-
"@tanstack/react-router": "file:../router/packages/react-router",
168-
"@tanstack/react-router-devtools": "file:../router/packages/router-devtools",
169-
"@tanstack/react-start": "file:../router/packages/react-start",
170-
"@tanstack/history": "file:../router/packages/history",
171-
"@tanstack/react-store": "file:../router/packages/react-router/node_modules/@tanstack/react-store",
172-
"@tanstack/router-vite-plugin": "file:../router/packages/router-vite-plugin",
173-
"@tanstack/router-generator": "file:../router/packages/router-generator"
161+
"unicorn-magic": "^0.4.0",
162+
"@tanstack/cli": "link:../cli/packages/cli"
174163
}
175164
}
176165
}

pnpm-lock.yaml

Lines changed: 175 additions & 378 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/link.js

Lines changed: 0 additions & 61 deletions
This file was deleted.

src/builder/api/features.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ export interface FeatureInfo {
2727
description: string
2828
category: string
2929
requires: Array<string>
30-
conflicts: Array<string>
30+
// Exclusive types - only one feature per exclusive type can be selected
31+
exclusive: Array<string>
3132
hasOptions: boolean
3233
options?: Array<FeatureOption>
3334
link?: string
@@ -60,7 +61,7 @@ function toFeatureInfo(integration: ManifestIntegration): FeatureInfo {
6061
description: integration.description,
6162
category: integration.category ?? 'other',
6263
requires: integration.dependsOn ?? [],
63-
conflicts: integration.conflicts ?? [],
64+
exclusive: integration.exclusive ?? [],
6465
hasOptions: integration.hasOptions ?? false,
6566
link: normalizeUrl(integration.link),
6667
color: integration.color,

src/builder/api/validate.ts

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,21 +79,30 @@ export async function validateHandler(
7979
}
8080
}
8181

82-
// Check for conflicts
82+
// Check for exclusive type conflicts
83+
// Build a map of exclusive type -> list of selected integrations with that type
84+
const exclusiveTypeMap = new Map<string, Array<string>>()
8385
for (const featureId of definition.features) {
8486
const integration = integrationMap.get(featureId)
85-
if (integration?.conflicts) {
86-
for (const conflictId of integration.conflicts) {
87-
if (definition.features.includes(conflictId)) {
88-
errors.push({
89-
field: 'features',
90-
message: `'${featureId}' conflicts with '${conflictId}'`,
91-
})
92-
}
87+
if (integration?.exclusive) {
88+
for (const exclusiveType of integration.exclusive) {
89+
const existing = exclusiveTypeMap.get(exclusiveType) || []
90+
existing.push(featureId)
91+
exclusiveTypeMap.set(exclusiveType, existing)
9392
}
9493
}
9594
}
9695

96+
// Report conflicts for exclusive types with more than one integration
97+
for (const [exclusiveType, integrationIds] of exclusiveTypeMap) {
98+
if (integrationIds.length > 1) {
99+
errors.push({
100+
field: 'features',
101+
message: `Only one ${exclusiveType} integration allowed. Selected: ${integrationIds.join(', ')}`,
102+
})
103+
}
104+
}
105+
97106
return {
98107
valid: errors.length === 0,
99108
errors,

src/components/DocsLayout.tsx

Lines changed: 32 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,8 @@ export function DocsLayout({
508508
const [isFullWidth, setIsFullWidth] = useLocalStorage('docsFullWidth', false)
509509

510510
const activePartners = partners.filter(
511-
(d) => d.status === 'active' && d.name !== 'Nozzle.io',
511+
(d) =>
512+
d.status === 'active' && d.name !== 'Nozzle.io' && d.id !== 'fireship',
512513
)
513514

514515
const menuItems = menuConfig.map((group, i) => {
@@ -795,43 +796,41 @@ export function DocsLayout({
795796
Become a Partner
796797
</a>
797798
</div>
798-
{activePartners
799-
.filter((d) => d.id !== 'fireship')
800-
.map((partner) => {
801-
// flexBasis as percentage based on score, flexGrow to fill remaining row space
802-
const widthPercent = Math.round(partner.score * 100)
803-
804-
return (
805-
<a
806-
key={partner.name}
807-
href={partner.href}
808-
target="_blank"
809-
rel="noreferrer"
810-
className="flex items-center justify-center px-3 py-2
799+
{activePartners.map((partner) => {
800+
// flexBasis as percentage based on score, flexGrow to fill remaining row space
801+
const widthPercent = Math.round(partner.score * 100)
802+
803+
return (
804+
<a
805+
key={partner.name}
806+
href={partner.href}
807+
target="_blank"
808+
rel="noreferrer"
809+
className="flex items-center justify-center px-3 py-2
811810
border-r border-b border-gray-500/20
812811
hover:bg-gray-500/10 transition-colors duration-150 ease-out"
812+
style={{
813+
flexBasis: `${widthPercent}%`,
814+
flexGrow: 1,
815+
flexShrink: 0,
816+
}}
817+
>
818+
<div
813819
style={{
814-
flexBasis: `${widthPercent}%`,
815-
flexGrow: 1,
816-
flexShrink: 0,
820+
width: Math.max(
821+
60 + Math.round(140 * partner.score),
822+
70,
823+
),
817824
}}
818825
>
819-
<div
820-
style={{
821-
width: Math.max(
822-
60 + Math.round(140 * partner.score),
823-
70,
824-
),
825-
}}
826-
>
827-
<PartnerImage
828-
config={partner.image}
829-
alt={partner.name}
830-
/>
831-
</div>
832-
</a>
833-
)
834-
})}
826+
<PartnerImage
827+
config={partner.image}
828+
alt={partner.name}
829+
/>
830+
</div>
831+
</a>
832+
)
833+
})}
835834
</div>
836835
<AdGate>
837836
<GamVrec1

0 commit comments

Comments
 (0)