@donotdev/cli 0.3.0 → 0.3.2
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/dependencies-matrix.json +51 -27
- package/dist/bin/commands/agent-setup.js +28 -18
- package/dist/bin/commands/build.js +1086 -58
- package/dist/bin/commands/bump.js +337 -53
- package/dist/bin/commands/cacheout.js +28 -18
- package/dist/bin/commands/coach.js +33 -25
- package/dist/bin/commands/create-app.js +597 -244
- package/dist/bin/commands/create-project.js +607 -254
- package/dist/bin/commands/db-check.js +37 -28
- package/dist/bin/commands/db.js +37 -28
- package/dist/bin/commands/deploy.js +13758 -11807
- package/dist/bin/commands/dev.js +50 -34
- package/dist/bin/commands/doctor.js +33 -25
- package/dist/bin/commands/emu.js +65 -43
- package/dist/bin/commands/format.js +28 -18
- package/dist/bin/commands/get-demo.js +81 -46
- package/dist/bin/commands/make-admin.js +966 -896
- package/dist/bin/commands/preview.js +50 -34
- package/dist/bin/commands/seed.js +37 -28
- package/dist/bin/commands/setup-cicd.js +1286 -87
- package/dist/bin/commands/setup.js +152 -138
- package/dist/bin/commands/staging.js +13758 -11807
- package/dist/bin/commands/sync-secrets.js +152 -132
- package/dist/bin/commands/type-check.js +1086 -39
- package/dist/bin/commands/wai.js +28 -18
- package/dist/bin/dndev.js +513 -30
- package/dist/bin/donotdev.js +33 -8
- package/dist/index.js +14568 -12497
- package/package.json +1 -1
- package/templates/app-demo/index.html.example +0 -1
- package/templates/app-demo/src/pages/ConditionalFormPage.tsx.example +2 -2
- package/templates/app-demo/src/pages/ShowcaseDetailPage.tsx.example +1 -0
- package/templates/app-demo/tsconfig.json.example +1 -1
- package/templates/app-dndev/index.html.example +1 -3
- package/templates/app-dndev/src/pages/NotFoundPage.tsx.example +1 -0
- package/templates/app-expo/app/_layout.tsx.example +1 -1
- package/templates/app-expo/app/form.tsx.example +10 -3
- package/templates/app-expo/app/index.tsx.example +3 -3
- package/templates/app-expo/app/list.tsx.example +2 -2
- package/templates/app-expo/app/profile.tsx.example +4 -3
- package/templates/app-expo/app/signin.tsx.example +2 -2
- package/templates/app-expo/babel.config.js.example +23 -6
- package/templates/app-expo/metro.config.js.example +7 -17
- package/templates/app-expo/tsconfig.json.example +2 -1
- package/templates/app-next/src/app/AppDocument.tsx.example +2 -3
- package/templates/app-vite/index.html.example +1 -3
- package/templates/app-vite/src/locales/home_en.json.example +6 -6
- package/templates/app-vite/src/pages/FormPageExample.tsx.example +1 -1
- package/templates/app-vite/src/pages/HomePage.tsx.example +3 -3
- package/templates/app-vite/src/pages/NotFoundPage.tsx.example +1 -0
- package/templates/deploy-config/firebase.json.example +6 -5
- package/templates/deploy-config/tsconfig.functions.json.example +2 -7
- package/templates/deploy-config/vercel.json.example +6 -420
- package/templates/functions-firebase/README.md.example +8 -8
- package/templates/functions-firebase/functions.config.js.example +2 -1
- package/templates/functions-firebase/src/index.ts.example +4 -3
- package/templates/functions-firebase/src/oauth/exchangeToken.ts.example +8 -6
- package/templates/functions-firebase/src/oauth/refreshToken.ts.example +8 -6
- package/templates/functions-firebase/tsconfig.json.example +3 -5
- package/templates/functions-supabase/supabase/config.toml.example +2 -1
- package/templates/functions-supabase/supabase/functions/change-plan/index.ts.example +2 -3
- package/templates/functions-supabase/supabase/functions/create-checkout-session/index.ts.example +2 -3
- package/templates/functions-supabase/supabase/functions/stripe-webhook/index.ts.example +2 -3
- package/templates/functions-vercel/README.md.example +15 -25
- package/templates/functions-vercel/build.mjs.example +4 -46
- package/templates/functions-vercel/src/api/auth/setCustomClaims.ts.example +6 -11
- package/templates/functions-vercel/src/api/billing/handleStripeWebhook.ts.example +2 -3
- package/templates/functions-vercel/src/api/oauth/checkGitHubAccess.ts.example +5 -11
- package/templates/functions-vercel/src/api/oauth/exchangeToken.ts.example +5 -11
- package/templates/functions-vercel/src/api/oauth/grantGitHubAccess.ts.example +5 -11
- package/templates/functions-vercel/tsconfig.json.example +5 -6
- package/templates/github/workflows/firebase-deploy.yml.example +1 -1
- package/templates/preset-admin/src/pages/DashboardPage.tsx.example +3 -2
- package/templates/preset-admin/src/pages/ReportsPage.tsx.example +13 -12
- package/templates/preset-admin/src/pages/SettingsPage.tsx.example +5 -5
- package/templates/preset-admin/src/pages/UsersPage.tsx.example +13 -12
- package/templates/preset-ecommerce/src/pages/CartPage.tsx.example +5 -5
- package/templates/preset-ecommerce/src/pages/CatalogPage.tsx.example +1 -4
- package/templates/preset-ecommerce/src/pages/CheckoutPage.tsx.example +10 -12
- package/templates/preset-ecommerce/src/pages/ProductPage.tsx.example +7 -4
- package/templates/preset-landing/src/pages/AboutPage.tsx.example +11 -9
- package/templates/preset-landing/src/pages/ContactPage.tsx.example +13 -7
- package/templates/preset-landing/src/pages/HomePage.tsx.example +50 -32
- package/templates/preset-saas/src/pages/DashboardPage.tsx.example +1 -1
- package/templates/preset-saas/src/pages/HomePage.tsx.example +3 -2
- package/templates/preset-saas/src/pages/PricingPage.tsx.example +4 -3
- package/templates/preset-saas/src/pages/ProfilePage.tsx.example +7 -7
- package/templates/preset-saas/src/pages/SettingsPage.tsx.example +3 -3
- package/templates/root-consumer/.claude/hooks/guard-bash.sh.example +101 -10
- package/templates/root-consumer/.claude/rules/definition-of-done.md.example +2 -2
- package/templates/root-consumer/.claude/rules/framework.md.example +1 -1
- package/templates/root-consumer/.claude/settings.json.example +0 -11
- package/templates/root-consumer/.claude/skills/build/SKILL.md.example +1 -1
- package/templates/root-consumer/.dndev/args.json.example +2 -2
- package/templates/root-consumer/.env.example +1 -1
- package/templates/root-consumer/.gitignore.example +2 -0
- package/templates/root-consumer/AGENTS.md.example +3 -3
- package/templates/root-consumer/README.md.example +1 -1
- package/templates/app-vite/csp.example.json +0 -44
- package/templates/functions-vercel/src/api/oauth/disconnect.ts.example +0 -20
- package/templates/functions-vercel/src/api/oauth/getConnections.ts.example +0 -20
- package/templates/functions-vercel/src/api/oauth/refreshToken.ts.example +0 -20
- package/templates/functions-vercel/vercel.json.example +0 -14
- package/templates/root-consumer/.claude/hooks/typecheck-stop.sh.example +0 -18
|
@@ -35,6 +35,9 @@ export const meta: PageMeta = {
|
|
|
35
35
|
icon: <Package />,
|
|
36
36
|
route: '/products/:id',
|
|
37
37
|
hideFromMenu: true,
|
|
38
|
+
// Hardcoded demo product: no record entity behind this route yet. When you
|
|
39
|
+
// back it with an entity, declare `entity: productEntity` and drop noindex.
|
|
40
|
+
seo: { noindex: true },
|
|
38
41
|
};
|
|
39
42
|
|
|
40
43
|
const product = {
|
|
@@ -72,7 +75,7 @@ export default function ProductPage() {
|
|
|
72
75
|
const accordionItems = [
|
|
73
76
|
{
|
|
74
77
|
value: 'description',
|
|
75
|
-
|
|
78
|
+
trigger: t('product.accordion.description', 'Description'),
|
|
76
79
|
content: (
|
|
77
80
|
<Text level="body">
|
|
78
81
|
{t(
|
|
@@ -84,7 +87,7 @@ export default function ProductPage() {
|
|
|
84
87
|
},
|
|
85
88
|
{
|
|
86
89
|
value: 'specs',
|
|
87
|
-
|
|
90
|
+
trigger: t('product.accordion.specifications', 'Specifications'),
|
|
88
91
|
content: (
|
|
89
92
|
<Stack gap="tight">
|
|
90
93
|
<Text level="small">Driver size: 40mm</Text>
|
|
@@ -98,7 +101,7 @@ export default function ProductPage() {
|
|
|
98
101
|
},
|
|
99
102
|
{
|
|
100
103
|
value: 'shipping',
|
|
101
|
-
|
|
104
|
+
trigger: t('product.accordion.shipping', 'Shipping Info'),
|
|
102
105
|
content: (
|
|
103
106
|
<Stack gap="tight">
|
|
104
107
|
<Text level="small">{t('product.shipping.standard', 'Standard delivery: 3-5 business days (free over 50 EUR)')}</Text>
|
|
@@ -109,7 +112,7 @@ export default function ProductPage() {
|
|
|
109
112
|
},
|
|
110
113
|
{
|
|
111
114
|
value: 'reviews',
|
|
112
|
-
|
|
115
|
+
trigger: t('product.accordion.reviews', 'Reviews (128)'),
|
|
113
116
|
content: (
|
|
114
117
|
<Stack gap="medium">
|
|
115
118
|
<Stack gap="tight">
|
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
Stack,
|
|
24
24
|
Text,
|
|
25
25
|
CallToAction,
|
|
26
|
+
Button,
|
|
26
27
|
SplitReveal,
|
|
27
28
|
} from '@donotdev/components';
|
|
28
29
|
import type { PageMeta } from '@donotdev/core';
|
|
@@ -108,7 +109,6 @@ export default function AboutPage() {
|
|
|
108
109
|
</Stack>
|
|
109
110
|
}
|
|
110
111
|
useStatCards
|
|
111
|
-
stagger
|
|
112
112
|
/>
|
|
113
113
|
</Section>
|
|
114
114
|
|
|
@@ -222,14 +222,16 @@ export default function AboutPage() {
|
|
|
222
222
|
'We are always looking for talented people who care deeply about developer experience. Check our open positions or reach out directly.'
|
|
223
223
|
)}
|
|
224
224
|
tone="primary"
|
|
225
|
-
primaryAction={
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
icon
|
|
232
|
-
|
|
225
|
+
primaryAction={
|
|
226
|
+
<Button variant="primary" icon={Sparkles}>
|
|
227
|
+
{t('cta.primary', 'View Open Positions')}
|
|
228
|
+
</Button>
|
|
229
|
+
}
|
|
230
|
+
secondaryAction={
|
|
231
|
+
<Button variant="outline" icon={Mail}>
|
|
232
|
+
{t('cta.secondary', 'Get in Touch')}
|
|
233
|
+
</Button>
|
|
234
|
+
}
|
|
233
235
|
/>
|
|
234
236
|
</Section>
|
|
235
237
|
</PageContainer>
|
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
Button,
|
|
26
26
|
Input,
|
|
27
27
|
Textarea,
|
|
28
|
+
Label,
|
|
28
29
|
Alert,
|
|
29
30
|
} from '@donotdev/components';
|
|
30
31
|
import type { PageMeta } from '@donotdev/core';
|
|
@@ -97,13 +98,18 @@ export default function ContactPage() {
|
|
|
97
98
|
label={t('form.subject.label', 'Subject')}
|
|
98
99
|
placeholder={t('form.subject.placeholder', 'How can we help?')}
|
|
99
100
|
/>
|
|
100
|
-
<
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
101
|
+
<Stack gap="tight">
|
|
102
|
+
<Label htmlFor="contact-message">
|
|
103
|
+
{t('form.message.label', 'Message')}
|
|
104
|
+
</Label>
|
|
105
|
+
<Textarea
|
|
106
|
+
id="contact-message"
|
|
107
|
+
placeholder={t(
|
|
108
|
+
'form.message.placeholder',
|
|
109
|
+
'Tell us about your project or question...'
|
|
110
|
+
)}
|
|
111
|
+
/>
|
|
112
|
+
</Stack>
|
|
107
113
|
<Button
|
|
108
114
|
variant="primary"
|
|
109
115
|
icon={<Send />}
|
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
Stack,
|
|
27
27
|
Text,
|
|
28
28
|
CallToAction,
|
|
29
|
+
Button,
|
|
29
30
|
Accordion,
|
|
30
31
|
Marquee,
|
|
31
32
|
SplitReveal,
|
|
@@ -46,6 +47,17 @@ export const meta: PageMeta = {
|
|
|
46
47
|
route: '/',
|
|
47
48
|
};
|
|
48
49
|
|
|
50
|
+
const TRUSTED_COMPANIES = [
|
|
51
|
+
{ name: 'Acme Corp' },
|
|
52
|
+
{ name: 'Globex' },
|
|
53
|
+
{ name: 'Initech' },
|
|
54
|
+
{ name: 'Umbrella' },
|
|
55
|
+
{ name: 'Cyberdyne' },
|
|
56
|
+
{ name: 'Stark Industries' },
|
|
57
|
+
{ name: 'Wayne Enterprises' },
|
|
58
|
+
{ name: 'Oscorp' },
|
|
59
|
+
];
|
|
60
|
+
|
|
49
61
|
export default function HomePage() {
|
|
50
62
|
const { t } = useTranslation(NAMESPACE);
|
|
51
63
|
|
|
@@ -75,22 +87,13 @@ export default function HomePage() {
|
|
|
75
87
|
{t('trusted.label', 'Trusted by forward-thinking teams worldwide')}
|
|
76
88
|
</Text>
|
|
77
89
|
<Marquee
|
|
78
|
-
items={
|
|
79
|
-
|
|
80
|
-
{
|
|
81
|
-
{ name: 'Initech' },
|
|
82
|
-
{ name: 'Umbrella' },
|
|
83
|
-
{ name: 'Cyberdyne' },
|
|
84
|
-
{ name: 'Stark Industries' },
|
|
85
|
-
{ name: 'Wayne Enterprises' },
|
|
86
|
-
{ name: 'Oscorp' },
|
|
87
|
-
]}
|
|
88
|
-
renderItem={(item) => (
|
|
89
|
-
<Badge variant="outline" tooltip={item.name}>
|
|
90
|
+
items={TRUSTED_COMPANIES}
|
|
91
|
+
renderItem={(company) => (
|
|
92
|
+
<Badge variant="outline" tooltip={company.name}>
|
|
90
93
|
<Stack direction="row" align="center" gap="tight">
|
|
91
94
|
<Building2 />
|
|
92
95
|
<Text level="body" weight="bold">
|
|
93
|
-
{
|
|
96
|
+
{company.name}
|
|
94
97
|
</Text>
|
|
95
98
|
</Stack>
|
|
96
99
|
</Badge>
|
|
@@ -208,7 +211,6 @@ export default function HomePage() {
|
|
|
208
211
|
</Stack>
|
|
209
212
|
}
|
|
210
213
|
useStatCards
|
|
211
|
-
stagger
|
|
212
214
|
/>
|
|
213
215
|
</Section>
|
|
214
216
|
|
|
@@ -224,29 +226,37 @@ export default function HomePage() {
|
|
|
224
226
|
<Roadmap
|
|
225
227
|
steps={[
|
|
226
228
|
{
|
|
229
|
+
phase: t('roadmap.step1.phase', 'Step 1'),
|
|
230
|
+
icon: Zap,
|
|
227
231
|
title: t('roadmap.step1.title', 'Initialize'),
|
|
228
|
-
|
|
232
|
+
subtitle: t(
|
|
229
233
|
'roadmap.step1.desc',
|
|
230
234
|
'Run a single command to scaffold your project with the right structure, tooling, and configuration.'
|
|
231
235
|
),
|
|
232
236
|
},
|
|
233
237
|
{
|
|
238
|
+
phase: t('roadmap.step2.phase', 'Step 2'),
|
|
239
|
+
icon: Layers,
|
|
234
240
|
title: t('roadmap.step2.title', 'Model'),
|
|
235
|
-
|
|
241
|
+
subtitle: t(
|
|
236
242
|
'roadmap.step2.desc',
|
|
237
243
|
'Define your data entities, relationships, and business rules. The framework generates types, validation, and API endpoints.'
|
|
238
244
|
),
|
|
239
245
|
},
|
|
240
246
|
{
|
|
247
|
+
phase: t('roadmap.step3.phase', 'Step 3'),
|
|
248
|
+
icon: Sparkles,
|
|
241
249
|
title: t('roadmap.step3.title', 'Compose'),
|
|
242
|
-
|
|
250
|
+
subtitle: t(
|
|
243
251
|
'roadmap.step3.desc',
|
|
244
252
|
'Build your UI by assembling production-grade components. Responsive, accessible, and themed by default.'
|
|
245
253
|
),
|
|
246
254
|
},
|
|
247
255
|
{
|
|
256
|
+
phase: t('roadmap.step4.phase', 'Step 4'),
|
|
257
|
+
icon: Rocket,
|
|
248
258
|
title: t('roadmap.step4.title', 'Ship'),
|
|
249
|
-
|
|
259
|
+
subtitle: t(
|
|
250
260
|
'roadmap.step4.desc',
|
|
251
261
|
'Deploy to production with one command. CI/CD, monitoring, and scaling are handled automatically.'
|
|
252
262
|
),
|
|
@@ -327,42 +337,48 @@ export default function HomePage() {
|
|
|
327
337
|
collapsible
|
|
328
338
|
items={[
|
|
329
339
|
{
|
|
330
|
-
|
|
340
|
+
value: 'q1',
|
|
341
|
+
trigger: t('faq.q1.title', 'Is {{appShortName}} free to use?'),
|
|
331
342
|
content: t(
|
|
332
343
|
'faq.q1.answer',
|
|
333
344
|
'Yes. The core framework is open-source under the MIT license. We offer premium support and managed hosting for teams that need it.'
|
|
334
345
|
),
|
|
335
346
|
},
|
|
336
347
|
{
|
|
337
|
-
|
|
348
|
+
value: 'q2',
|
|
349
|
+
trigger: t('faq.q2.title', 'What backends are supported?'),
|
|
338
350
|
content: t(
|
|
339
351
|
'faq.q2.answer',
|
|
340
352
|
'Firebase, Supabase, and Vercel are supported out of the box. The architecture is provider-agnostic, so adding a custom backend is straightforward.'
|
|
341
353
|
),
|
|
342
354
|
},
|
|
343
355
|
{
|
|
344
|
-
|
|
356
|
+
value: 'q3',
|
|
357
|
+
trigger: t('faq.q3.title', 'Can I use it for an existing project?'),
|
|
345
358
|
content: t(
|
|
346
359
|
'faq.q3.answer',
|
|
347
360
|
'Absolutely. Each package is independent and can be adopted incrementally. Start with the component library or the CRUD module and expand from there.'
|
|
348
361
|
),
|
|
349
362
|
},
|
|
350
363
|
{
|
|
351
|
-
|
|
364
|
+
value: 'q4',
|
|
365
|
+
trigger: t('faq.q4.title', 'How does it handle scaling?'),
|
|
352
366
|
content: t(
|
|
353
367
|
'faq.q4.answer',
|
|
354
368
|
'The framework is designed for serverless-first architecture. Functions scale to zero when idle and auto-scale under load. No infrastructure management required.'
|
|
355
369
|
),
|
|
356
370
|
},
|
|
357
371
|
{
|
|
358
|
-
|
|
372
|
+
value: 'q5',
|
|
373
|
+
trigger: t('faq.q5.title', 'Is there a component library?'),
|
|
359
374
|
content: t(
|
|
360
375
|
'faq.q5.answer',
|
|
361
376
|
'Yes. Over 60 production-ready components with full accessibility, theming, responsive behavior, and RTL support. All documented with live examples.'
|
|
362
377
|
),
|
|
363
378
|
},
|
|
364
379
|
{
|
|
365
|
-
|
|
380
|
+
value: 'q6',
|
|
381
|
+
trigger: t('faq.q6.title', 'What about mobile?'),
|
|
366
382
|
content: t(
|
|
367
383
|
'faq.q6.answer',
|
|
368
384
|
'Web apps are fully responsive by default. For native mobile, we provide an Expo template with shared business logic and consistent design tokens.'
|
|
@@ -384,14 +400,16 @@ export default function HomePage() {
|
|
|
384
400
|
'Join thousands of developers who ship faster with {{appName}}. Get started in under two minutes.'
|
|
385
401
|
)}
|
|
386
402
|
tone="primary"
|
|
387
|
-
primaryAction={
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
icon
|
|
394
|
-
|
|
403
|
+
primaryAction={
|
|
404
|
+
<Button variant="primary" icon={Sparkles}>
|
|
405
|
+
{t('cta.primary', 'Get Started Free')}
|
|
406
|
+
</Button>
|
|
407
|
+
}
|
|
408
|
+
secondaryAction={
|
|
409
|
+
<Button variant="outline" icon={Layers}>
|
|
410
|
+
{t('cta.secondary', 'View Documentation')}
|
|
411
|
+
</Button>
|
|
412
|
+
}
|
|
395
413
|
/>
|
|
396
414
|
</Section>
|
|
397
415
|
</PageContainer>
|
|
@@ -136,7 +136,7 @@ export default function DashboardPage() {
|
|
|
136
136
|
content={
|
|
137
137
|
<Stack gap="tight">
|
|
138
138
|
{recentActivity.map((item, i) => (
|
|
139
|
-
<Stack key={i} direction="row" justify="
|
|
139
|
+
<Stack key={i} direction="row" justify="between" align="center" gap="medium">
|
|
140
140
|
<Stack direction="row" align="center" gap="tight">
|
|
141
141
|
<Activity
|
|
142
142
|
style={{
|
|
@@ -28,10 +28,11 @@ import {
|
|
|
28
28
|
Stack,
|
|
29
29
|
Text,
|
|
30
30
|
} from '@donotdev/components';
|
|
31
|
+
import type { RoadmapStep } from '@donotdev/components';
|
|
31
32
|
import { useTranslation } from '@donotdev/core';
|
|
32
33
|
import { FeatureCard, Link, PageContainer } from '@donotdev/ui';
|
|
33
34
|
|
|
34
|
-
import type { PageMeta
|
|
35
|
+
import type { PageMeta } from '@donotdev/core';
|
|
35
36
|
|
|
36
37
|
export const NAMESPACE = 'home';
|
|
37
38
|
|
|
@@ -183,7 +184,7 @@ export default function HomePage() {
|
|
|
183
184
|
</Section>
|
|
184
185
|
|
|
185
186
|
<Section title={t('home.pricing.title', 'Simple, Transparent Pricing')} tone="muted">
|
|
186
|
-
<Stack gap="medium" direction="row" wrap justify="center">
|
|
187
|
+
<Stack gap="medium" direction="row" wrap="wrap" justify="center">
|
|
187
188
|
{pricingTiers.map((tier) => (
|
|
188
189
|
<Card
|
|
189
190
|
key={tier.name}
|
|
@@ -167,9 +167,9 @@ export default function PricingPage() {
|
|
|
167
167
|
</Stack>
|
|
168
168
|
<List
|
|
169
169
|
items={plan.features}
|
|
170
|
-
icon={Check}
|
|
170
|
+
icon={<Check />}
|
|
171
171
|
gap="tight"
|
|
172
|
-
density="
|
|
172
|
+
density="dense"
|
|
173
173
|
/>
|
|
174
174
|
</Stack>
|
|
175
175
|
}
|
|
@@ -188,7 +188,8 @@ export default function PricingPage() {
|
|
|
188
188
|
<Section title={t('pricing.faq.title', 'Frequently Asked Questions')} tone="muted">
|
|
189
189
|
<Accordion
|
|
190
190
|
items={faqItems.map((item) => ({
|
|
191
|
-
|
|
191
|
+
value: item.title,
|
|
192
|
+
trigger: t(`pricing.faq.${item.title}`, item.title),
|
|
192
193
|
content: (
|
|
193
194
|
<Text level="body" variant="muted">
|
|
194
195
|
{t(`pricing.faq.${item.title}.answer`, item.content)}
|
|
@@ -83,7 +83,7 @@ export default function ProfilePage() {
|
|
|
83
83
|
icon={User}
|
|
84
84
|
content={
|
|
85
85
|
<Stack gap="medium">
|
|
86
|
-
<Stack direction="row" justify="
|
|
86
|
+
<Stack direction="row" justify="between" align="center">
|
|
87
87
|
<Stack direction="row" align="center" gap="tight">
|
|
88
88
|
<Mail style={{ width: 'var(--icon-sm)', height: 'var(--icon-sm)', color: 'var(--muted-foreground)' }} />
|
|
89
89
|
<Text level="small" variant="muted">
|
|
@@ -95,7 +95,7 @@ export default function ProfilePage() {
|
|
|
95
95
|
|
|
96
96
|
<Separator />
|
|
97
97
|
|
|
98
|
-
<Stack direction="row" justify="
|
|
98
|
+
<Stack direction="row" justify="between" align="center">
|
|
99
99
|
<Stack direction="row" align="center" gap="tight">
|
|
100
100
|
<Calendar style={{ width: 'var(--icon-sm)', height: 'var(--icon-sm)', color: 'var(--muted-foreground)' }} />
|
|
101
101
|
<Text level="small" variant="muted">
|
|
@@ -109,7 +109,7 @@ export default function ProfilePage() {
|
|
|
109
109
|
|
|
110
110
|
<Separator />
|
|
111
111
|
|
|
112
|
-
<Stack direction="row" justify="
|
|
112
|
+
<Stack direction="row" justify="between" align="center">
|
|
113
113
|
<Stack direction="row" align="center" gap="tight">
|
|
114
114
|
<Crown style={{ width: 'var(--icon-sm)', height: 'var(--icon-sm)', color: 'var(--muted-foreground)' }} />
|
|
115
115
|
<Text level="small" variant="muted">
|
|
@@ -130,7 +130,7 @@ export default function ProfilePage() {
|
|
|
130
130
|
variant={CARD_VARIANT.ACCENT}
|
|
131
131
|
content={
|
|
132
132
|
<Stack gap="medium">
|
|
133
|
-
<Stack direction="row" justify="
|
|
133
|
+
<Stack direction="row" justify="between" align="center">
|
|
134
134
|
<Text level="body" weight="medium">
|
|
135
135
|
{t('profile.subscription.plan', 'Pro Plan')}
|
|
136
136
|
</Text>
|
|
@@ -140,7 +140,7 @@ export default function ProfilePage() {
|
|
|
140
140
|
<Separator />
|
|
141
141
|
|
|
142
142
|
<Stack gap="tight">
|
|
143
|
-
<Stack direction="row" justify="
|
|
143
|
+
<Stack direction="row" justify="between">
|
|
144
144
|
<Text level="small" variant="muted">
|
|
145
145
|
{t('profile.subscription.nextBilling', 'Next billing date')}
|
|
146
146
|
</Text>
|
|
@@ -148,7 +148,7 @@ export default function ProfilePage() {
|
|
|
148
148
|
{t('profile.subscription.nextDate', 'April 15, 2024')}
|
|
149
149
|
</Text>
|
|
150
150
|
</Stack>
|
|
151
|
-
<Stack direction="row" justify="
|
|
151
|
+
<Stack direction="row" justify="between">
|
|
152
152
|
<Text level="small" variant="muted">
|
|
153
153
|
{t('profile.subscription.paymentMethod', 'Payment method')}
|
|
154
154
|
</Text>
|
|
@@ -161,7 +161,7 @@ export default function ProfilePage() {
|
|
|
161
161
|
<Separator />
|
|
162
162
|
|
|
163
163
|
<Stack gap="tight">
|
|
164
|
-
<Stack direction="row" justify="
|
|
164
|
+
<Stack direction="row" justify="between">
|
|
165
165
|
<Text level="small" variant="muted">
|
|
166
166
|
{t('profile.subscription.usage', 'Usage this month')}
|
|
167
167
|
</Text>
|
|
@@ -146,7 +146,7 @@ function NotificationsTab() {
|
|
|
146
146
|
content={
|
|
147
147
|
<Stack gap="medium">
|
|
148
148
|
{emailPreferences.map((pref) => (
|
|
149
|
-
<Stack key={pref.label} direction="row" justify="
|
|
149
|
+
<Stack key={pref.label} direction="row" justify="between" align="center" gap="medium">
|
|
150
150
|
<Stack gap="none">
|
|
151
151
|
<Text level="body" weight="medium">{pref.label}</Text>
|
|
152
152
|
<Text level="small" variant="muted">{pref.description}</Text>
|
|
@@ -165,7 +165,7 @@ function NotificationsTab() {
|
|
|
165
165
|
content={
|
|
166
166
|
<Stack gap="medium">
|
|
167
167
|
{pushPreferences.map((pref) => (
|
|
168
|
-
<Stack key={pref.label} direction="row" justify="
|
|
168
|
+
<Stack key={pref.label} direction="row" justify="between" align="center" gap="medium">
|
|
169
169
|
<Stack gap="none">
|
|
170
170
|
<Text level="body" weight="medium">{pref.label}</Text>
|
|
171
171
|
<Text level="small" variant="muted">{pref.description}</Text>
|
|
@@ -228,7 +228,7 @@ function SecurityTab() {
|
|
|
228
228
|
title={t('settings.security.twoFactorInfo', '2FA is currently disabled')}
|
|
229
229
|
description={t('settings.security.twoFactorInfoDesc', 'Enable two-factor authentication for enhanced account security. You will need an authenticator app like Google Authenticator or Authy.')}
|
|
230
230
|
/>
|
|
231
|
-
<Stack direction="row" justify="
|
|
231
|
+
<Stack direction="row" justify="between" align="center">
|
|
232
232
|
<Stack gap="none">
|
|
233
233
|
<Text level="body" weight="medium">
|
|
234
234
|
{t('settings.security.enable2FA', 'Enable 2FA')}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
# .claude/hooks/guard-bash.sh
|
|
3
3
|
# PreToolUse hook for Bash commands.
|
|
4
4
|
# Blocks dangerous/wrong commands. Exit 2 = block, exit 0 = allow.
|
|
5
|
+
# tsc / install checks look at command words only (not heredocs, quotes, comments).
|
|
5
6
|
# Uses bun -e for JSON parsing (bun-first project).
|
|
6
7
|
|
|
7
8
|
set -euo pipefail
|
|
@@ -12,20 +13,110 @@ COMMAND=$(echo "$INPUT" | bun -e "process.stdout.write(JSON.parse(await Bun.stdi
|
|
|
12
13
|
|
|
13
14
|
# --- HARD BLOCKS (exit 2) ---
|
|
14
15
|
|
|
16
|
+
# Command-word analysis (tsc / package-manager install).
|
|
17
|
+
# Splits the command into simple commands (on ; & | ( ) and newlines), ignoring quoted strings,
|
|
18
|
+
# comments and heredoc bodies, then looks only at each command's leading words.
|
|
19
|
+
# Prints "tsc" or "install" for the first offending simple command, nothing otherwise.
|
|
20
|
+
ANALYZER=$(cat <<'JS'
|
|
21
|
+
const src = await Bun.stdin.text();
|
|
22
|
+
const cmds = [];
|
|
23
|
+
let words = [];
|
|
24
|
+
let cur = '';
|
|
25
|
+
let inWord = false;
|
|
26
|
+
const heredocs = [];
|
|
27
|
+
const endWord = () => {
|
|
28
|
+
if (inWord) { words.push(cur); cur = ''; inWord = false; }
|
|
29
|
+
};
|
|
30
|
+
const endCmd = () => {
|
|
31
|
+
endWord();
|
|
32
|
+
if (words.length) { cmds.push(words); words = []; }
|
|
33
|
+
};
|
|
34
|
+
let i = 0;
|
|
35
|
+
while (i < src.length) {
|
|
36
|
+
const c = src[i];
|
|
37
|
+
if (c === '\\') { cur += src[i + 1] ?? ''; inWord = true; i += 2; continue; }
|
|
38
|
+
if (c === "'") {
|
|
39
|
+
const j = src.indexOf("'", i + 1);
|
|
40
|
+
const e = j < 0 ? src.length : j;
|
|
41
|
+
cur += src.slice(i + 1, e); inWord = true; i = e + 1; continue;
|
|
42
|
+
}
|
|
43
|
+
if (c === '"') {
|
|
44
|
+
let j = i + 1;
|
|
45
|
+
while (j < src.length && src[j] !== '"') { if (src[j] === '\\') j++; j++; }
|
|
46
|
+
cur += src.slice(i + 1, j); inWord = true; i = j + 1; continue;
|
|
47
|
+
}
|
|
48
|
+
if (c === '#' && !inWord) {
|
|
49
|
+
while (i < src.length && src[i] !== '\n') i++;
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
if (c === '<' && src[i + 1] === '<' && src[i + 2] !== '<') {
|
|
53
|
+
endWord();
|
|
54
|
+
i += 2;
|
|
55
|
+
const strip = src[i] === '-';
|
|
56
|
+
if (strip) i++;
|
|
57
|
+
while (src[i] === ' ' || src[i] === '\t') i++;
|
|
58
|
+
let delim = '';
|
|
59
|
+
while (i < src.length && !/[\s;&|()<>]/.test(src[i])) {
|
|
60
|
+
if (src[i] !== "'" && src[i] !== '"' && src[i] !== '\\') delim += src[i];
|
|
61
|
+
i++;
|
|
62
|
+
}
|
|
63
|
+
heredocs.push({ delim, strip });
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
if (c === '\n') {
|
|
67
|
+
endCmd();
|
|
68
|
+
i++;
|
|
69
|
+
for (const h of heredocs) {
|
|
70
|
+
while (i < src.length) {
|
|
71
|
+
let e = src.indexOf('\n', i);
|
|
72
|
+
if (e < 0) e = src.length;
|
|
73
|
+
const line = src.slice(i, e);
|
|
74
|
+
i = e + 1;
|
|
75
|
+
if ((h.strip ? line.replace(/^\t+/, '') : line) === h.delim) break;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
heredocs.length = 0;
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
if (c === ';' || c === '&' || c === '|' || c === '(' || c === ')') { endCmd(); i++; continue; }
|
|
82
|
+
if (c === ' ' || c === '\t' || c === '\r') { endWord(); i++; continue; }
|
|
83
|
+
cur += c; inWord = true; i++;
|
|
84
|
+
}
|
|
85
|
+
endCmd();
|
|
86
|
+
|
|
87
|
+
const base = (w) => w.slice(w.lastIndexOf('/') + 1);
|
|
88
|
+
const PM = ['bun', 'npm', 'yarn', 'pnpm'];
|
|
89
|
+
let verdict = '';
|
|
90
|
+
for (const w0 of cmds) {
|
|
91
|
+
let w = w0;
|
|
92
|
+
while (w.length && (/^[A-Za-z_][A-Za-z0-9_]*=/.test(w[0]) || ['time', 'exec', 'command'].includes(w[0]))) w = w.slice(1);
|
|
93
|
+
if (!w.length) continue;
|
|
94
|
+
const head = base(w[0]);
|
|
95
|
+
let rest = w.slice(1);
|
|
96
|
+
let runner = ['bunx', 'npx', 'pnpx'].includes(head);
|
|
97
|
+
if ((head === 'pnpm' && ['dlx', 'exec'].includes(rest[0])) || (head === 'bun' && rest[0] === 'x')) {
|
|
98
|
+
runner = true;
|
|
99
|
+
rest = rest.slice(1);
|
|
100
|
+
}
|
|
101
|
+
if (head === 'tsc') { verdict = 'tsc'; break; }
|
|
102
|
+
if (runner && rest.find((a) => !a.startsWith('-')) === 'tsc') { verdict = 'tsc'; break; }
|
|
103
|
+
if (PM.includes(head) && (rest[0] === 'install' || rest[0] === 'i') && !verdict) verdict = 'install';
|
|
104
|
+
}
|
|
105
|
+
process.stdout.write(verdict);
|
|
106
|
+
JS
|
|
107
|
+
)
|
|
108
|
+
VERDICT=$(printf '%s' "$COMMAND" | bun -e "$ANALYZER")
|
|
109
|
+
|
|
15
110
|
# Block raw TypeScript compiler (must use dn tc)
|
|
16
|
-
if
|
|
17
|
-
echo "BLOCKED: Use 'dn tc' for type-checking, never bunx/npx tsc." >&2
|
|
18
|
-
exit 2
|
|
19
|
-
fi
|
|
20
|
-
if echo "$COMMAND" | grep -qE '(^|\s|;|&&|\|)tsc(\s|$)'; then
|
|
21
|
-
echo "BLOCKED: Use 'dn tc' for type-checking, never raw tsc." >&2
|
|
111
|
+
if [ "$VERDICT" = "tsc" ]; then
|
|
112
|
+
echo "BLOCKED: Use 'dn tc' for type-checking, never raw tsc / bunx tsc / npx tsc." >&2
|
|
22
113
|
exit 2
|
|
23
114
|
fi
|
|
24
115
|
|
|
25
|
-
# Block
|
|
116
|
+
# Block reinstall once dependencies are installed (the first install of a fresh scaffold is allowed)
|
|
26
117
|
# bun add IS allowed — consumer projects may need additional packages
|
|
27
|
-
if
|
|
28
|
-
echo "BLOCKED: Use 'bun add <pkg>' to add
|
|
118
|
+
if [ "$VERDICT" = "install" ] && [ -d "${CLAUDE_PROJECT_DIR:-.}/node_modules" ]; then
|
|
119
|
+
echo "BLOCKED: Dependencies are already installed. Use 'bun add <pkg>' to add a package; a full reinstall is not needed." >&2
|
|
29
120
|
exit 2
|
|
30
121
|
fi
|
|
31
122
|
|
|
@@ -52,7 +143,7 @@ if echo "$COMMAND" | grep -qE 'rm\s+-rf\s+(/|\.|\*|src|apps|packages|node_module
|
|
|
52
143
|
fi
|
|
53
144
|
|
|
54
145
|
# Block skip hooks
|
|
55
|
-
if echo "$COMMAND" | grep -qE '--no-verify'; then
|
|
146
|
+
if echo "$COMMAND" | grep -qE -- '--no-verify'; then
|
|
56
147
|
echo "BLOCKED: --no-verify skips safety hooks. Fix the root cause instead." >&2
|
|
57
148
|
exit 2
|
|
58
149
|
fi
|
|
@@ -10,7 +10,7 @@ Every change is incomplete until ALL applicable items are done.
|
|
|
10
10
|
## Mandatory (every change)
|
|
11
11
|
|
|
12
12
|
1. **Code** - simple, follows existing patterns, robust, secure
|
|
13
|
-
2. **Typecheck** - `dn tc` passes
|
|
13
|
+
2. **Typecheck** - `dn tc` passes, run once at the end of the work batch (before commit / deploy), never after each change or feature
|
|
14
14
|
3. **i18n** - all user-facing strings via `t('key')`. Locale files updated.
|
|
15
15
|
|
|
16
16
|
## Mandatory for new features
|
|
@@ -30,7 +30,7 @@ Every skill output MUST end with:
|
|
|
30
30
|
```
|
|
31
31
|
## Definition of Done
|
|
32
32
|
- [x] Code: <files changed>
|
|
33
|
-
- [x] Typecheck: dn tc - PASS
|
|
33
|
+
- [x] Typecheck: dn tc - PASS, or deferred (more work follows in the batch)
|
|
34
34
|
- [x] i18n: <locale files updated, or N/A>
|
|
35
35
|
- [x] Tests: <test file, or N/A>
|
|
36
36
|
- [x] Spec compliance: <verified, or N/A>
|
|
@@ -22,7 +22,7 @@ Before hand-building a page, run `search_framework("Template")` and use the matc
|
|
|
22
22
|
|
|
23
23
|
## Use framework components, not HTML
|
|
24
24
|
|
|
25
|
-
`<div>` → Stack | `<button>` → Button | `<input>` →
|
|
25
|
+
`<div>` → Stack | `<button>` → Button | `<input>` → Input | `<a>` → Link | `<p>`/`<h1>` → Text | `<table>` → DataTable | `<form>` → Form | `<ul>` → List | `<img>` → ResponsiveImg (takes the `image` full/thumb pair)
|
|
26
26
|
|
|
27
27
|
Hook-enforced. Native HTML in source files is blocked.
|
|
28
28
|
|
|
@@ -34,7 +34,7 @@ Rules:
|
|
|
34
34
|
dn tc
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
Type-check must pass before
|
|
37
|
+
Type-check must pass before commit / deploy. Run it once at the end of the work batch (before commit / deploy), never after each change or feature: skip this step when more work follows in the batch.
|
|
38
38
|
|
|
39
39
|
## Step 3 - Complete Phase
|
|
40
40
|
|