@archetypeai/ds-cli 0.9.0 → 0.10.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.
- package/README.md +3 -3
- package/commands/create.js +2 -2
- package/commands/init.js +2 -2
- package/files/AGENTS.md +128 -70
- package/files/CLAUDE.md +128 -70
- package/files/ds-manifest.json +998 -1023
- package/lib/add-ds-config-codeagent.js +3 -57
- package/package.json +2 -2
- package/files/LICENSE +0 -21
- package/files/rules/accessibility.md +0 -268
- package/files/rules/charts.md +0 -256
- package/files/rules/components.md +0 -251
- package/files/rules/design-principles.md +0 -71
- package/files/rules/frontend-architecture.md +0 -86
- package/files/rules/linting.md +0 -31
- package/files/rules/state.md +0 -373
- package/files/rules/styling.md +0 -142
- package/files/skills/apply-ds/SKILL.md +0 -121
- package/files/skills/apply-ds/scripts/audit.sh +0 -169
- package/files/skills/apply-ds/scripts/setup.sh +0 -153
- package/files/skills/build-component/SKILL.md +0 -153
- package/files/skills/create-dashboard/SKILL.md +0 -220
- package/files/skills/deploy-worker/SKILL.md +0 -231
- package/files/skills/deploy-worker/references/wrangler-commands.md +0 -327
- package/files/skills/fix-accessibility/SKILL.md +0 -232
- package/files/skills/fix-metadata/SKILL.md +0 -118
- package/files/skills/fix-metadata/assets/favicon.ico +0 -0
- package/files/skills/setup-chart/SKILL.md +0 -223
- package/files/skills/setup-chart/data/embedding.csv +0 -42
- package/files/skills/setup-chart/data/timeseries.csv +0 -173
- package/files/skills/setup-chart/references/scatter-chart.md +0 -229
- package/files/skills/setup-chart/references/sensor-chart.md +0 -156
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: create-dashboard
|
|
3
|
-
description: Scaffolds a full-viewport dashboard layout with no scrolling, a branded menubar with the Archetype AI logo, and panel-based content areas. Use when creating a dashboard UI, building a full-screen layout, setting up a monitoring view, creating a control panel, or when the user asks for a "dashboard", "full-screen layout", "no-scroll UI", or "panel layout".
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Creating a Dashboard
|
|
7
|
-
|
|
8
|
-
Scaffold a full-viewport dashboard with a branded menubar and panel-based content.
|
|
9
|
-
|
|
10
|
-
> **Note:** This is one layout option for demos. If the user's request doesn't clearly map to a dashboard, consider the best-fit layout for their use case.
|
|
11
|
-
|
|
12
|
-
## Discovering Components
|
|
13
|
-
|
|
14
|
-
Before building, check which components are installed in the project:
|
|
15
|
-
|
|
16
|
-
1. Read `ds-manifest.json` at the project root — it lists every component in both packages (console + labs) with import subpaths and variant axes
|
|
17
|
-
2. Components come from the npm packages (`@archetypeai/ds-ui-svelte-console`, `@archetypeai/ds-ui-svelte-labs`); also check `$lib/components/ui/` for registry-installed (modified) copies and prefer those when present
|
|
18
|
-
3. If a required component does not exist in either tier, build it via `@skills/build-component`
|
|
19
|
-
4. **Never inline raw markup as a substitute for a missing component**
|
|
20
|
-
|
|
21
|
-
The dashboard requires at minimum: `Menubar`, `Button`. For card-based layouts: `Card`.
|
|
22
|
-
|
|
23
|
-
## Layout Requirements
|
|
24
|
-
|
|
25
|
-
Dashboards fill the entire viewport with no scrolling:
|
|
26
|
-
|
|
27
|
-
- `h-screen w-screen` — full viewport dimensions
|
|
28
|
-
- `overflow-hidden` — prevent any scrolling
|
|
29
|
-
- Grid layout: `grid grid-rows-[auto_1fr]` so the Menubar takes its natural height and content fills the rest
|
|
30
|
-
|
|
31
|
-
## Card Grid Defaults
|
|
32
|
-
|
|
33
|
-
Unless the user explicitly asks for a different layout:
|
|
34
|
-
|
|
35
|
-
- **Equal-width columns** — use `grid-cols-2`, `grid-cols-3`, etc. Never mix fixed and fluid widths for card grids (e.g., don't use `grid-cols-[300px_1fr]` for cards — that's for sidebar layouts only)
|
|
36
|
-
- **Cards fill available height** — cards must stretch to fill their grid cell or flex container. Add `max-h-full` to constrain content. For asymmetric layouts (stacked cards in one column, full-height card in another), use a flex column with `flex-1` on the card that should grow
|
|
37
|
-
- **Consistent spacing** — always use `gap-4` between cards and `p-4` padding around the grid
|
|
38
|
-
|
|
39
|
-
## Menubar
|
|
40
|
-
|
|
41
|
-
Use the labs `Menubar` component. It renders a branded `<header>` with the Archetype AI Logo on the left. Pass action content as children. The Menubar includes a built-in dark mode toggle on the far right that toggles the host app's dark class (via the console `darkMode` store). To disable it, pass `darkToggle={false}`.
|
|
42
|
-
|
|
43
|
-
**Every dashboard Menubar must include a "Send Report" button.** Additional actions can be appended alongside it.
|
|
44
|
-
|
|
45
|
-
```svelte
|
|
46
|
-
<script>
|
|
47
|
-
import Menubar from '@archetypeai/ds-ui-svelte-labs/primitives/menubar';
|
|
48
|
-
import { Button } from '@archetypeai/ds-ui-svelte-console/primitives/button';
|
|
49
|
-
</script>
|
|
50
|
-
|
|
51
|
-
<Menubar>
|
|
52
|
-
<!-- these children are additive examples — append to existing children, don't replace them, if there are no children, add them -->
|
|
53
|
-
<Button variant="link" class="text-muted-foreground">Send Report</Button>
|
|
54
|
-
</Menubar>
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
For co-branding, pass a `partnerLogo` snippet to add a separator and partner logo beside the Archetype AI Logo:
|
|
58
|
-
|
|
59
|
-
```svelte
|
|
60
|
-
<Menubar>
|
|
61
|
-
{#snippet partnerLogo()}
|
|
62
|
-
<img src="/partner-logo.svg" alt="Partner" class="h-6" />
|
|
63
|
-
{/snippet}
|
|
64
|
-
<!-- additive example — append to existing children, don't replace them -->
|
|
65
|
-
<Button variant="link" class="text-muted-foreground">Send Report</Button>
|
|
66
|
-
</Menubar>
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
## Preservation Rules
|
|
70
|
-
|
|
71
|
-
- **Never edit design system files in `node_modules`** — compose and override via props/`class`
|
|
72
|
-
- **Never rewrite or replace** registry-installed component source in `$lib/components/ui/` unless the user asked you to modify that component
|
|
73
|
-
- When a Menubar already has children (buttons, actions), **append** new actions alongside existing ones — do not replace them
|
|
74
|
-
- When a page already has content, **integrate alongside** existing markup — do not overwrite the file
|
|
75
|
-
|
|
76
|
-
## Full Layout
|
|
77
|
-
|
|
78
|
-
```svelte
|
|
79
|
-
<script>
|
|
80
|
-
import Menubar from '@archetypeai/ds-ui-svelte-labs/primitives/menubar';
|
|
81
|
-
import { Button } from '@archetypeai/ds-ui-svelte-console/primitives/button';
|
|
82
|
-
</script>
|
|
83
|
-
|
|
84
|
-
<div class="bg-background grid h-screen w-screen grid-rows-[auto_1fr] overflow-hidden">
|
|
85
|
-
<Menubar>
|
|
86
|
-
<Button variant="link" class="text-muted-foreground">Send Report</Button>
|
|
87
|
-
</Menubar>
|
|
88
|
-
|
|
89
|
-
<main class="overflow-hidden">
|
|
90
|
-
<!-- panels go here -->
|
|
91
|
-
</main>
|
|
92
|
-
</div>
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
## Panel Layouts
|
|
96
|
-
|
|
97
|
-
### Two Columns (Sidebar + Main)
|
|
98
|
-
|
|
99
|
-
```svelte
|
|
100
|
-
<main class="grid grid-cols-[300px_1fr] overflow-hidden">
|
|
101
|
-
<aside class="border-border overflow-y-auto border-r p-4">
|
|
102
|
-
<!-- sidebar content -->
|
|
103
|
-
</aside>
|
|
104
|
-
<section class="overflow-hidden p-4">
|
|
105
|
-
<!-- main content -->
|
|
106
|
-
</section>
|
|
107
|
-
</main>
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### Three Columns
|
|
111
|
-
|
|
112
|
-
```svelte
|
|
113
|
-
<main class="grid grid-cols-[250px_1fr_300px] overflow-hidden">
|
|
114
|
-
<aside class="border-border overflow-y-auto border-r p-4">
|
|
115
|
-
<!-- left panel -->
|
|
116
|
-
</aside>
|
|
117
|
-
<section class="overflow-hidden p-4">
|
|
118
|
-
<!-- center content -->
|
|
119
|
-
</section>
|
|
120
|
-
<aside class="border-border overflow-y-auto border-l p-4">
|
|
121
|
-
<!-- right panel -->
|
|
122
|
-
</aside>
|
|
123
|
-
</main>
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
### Grid of Cards (Equal)
|
|
127
|
-
|
|
128
|
-
```svelte
|
|
129
|
-
<main class="grid grid-cols-2 grid-rows-2 gap-4 overflow-hidden p-4">
|
|
130
|
-
<Card class="max-h-full"><!-- panel 1 --></Card>
|
|
131
|
-
<Card class="max-h-full"><!-- panel 2 --></Card>
|
|
132
|
-
<Card class="max-h-full"><!-- panel 3 --></Card>
|
|
133
|
-
<Card class="max-h-full"><!-- panel 4 --></Card>
|
|
134
|
-
</main>
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
### Asymmetric Cards (Stacked Left + Full-Height Right)
|
|
138
|
-
|
|
139
|
-
When one column has multiple cards and the other has a single tall card, use `grid-rows-subgrid` or nested flex columns. Cards must stretch to fill available height — never leave empty space at the bottom.
|
|
140
|
-
|
|
141
|
-
```svelte
|
|
142
|
-
<main class="grid grid-cols-[1fr_2fr] gap-4 overflow-hidden p-4">
|
|
143
|
-
<!-- Left column: stacked cards that fill height -->
|
|
144
|
-
<div class="flex flex-col gap-4 overflow-hidden">
|
|
145
|
-
<Card class="max-h-full"><!-- input --></Card>
|
|
146
|
-
<Card class="max-h-full"><!-- status --></Card>
|
|
147
|
-
<Card class="max-h-full flex-1"><!-- summary (grows to fill remaining space) --></Card>
|
|
148
|
-
</div>
|
|
149
|
-
<!-- Right column: single card spanning full height -->
|
|
150
|
-
<Card class="max-h-full overflow-hidden"><!-- log / results --></Card>
|
|
151
|
-
</main>
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
The `flex-1` on the last left-column card makes it grow to fill remaining vertical space. Adjust column ratio (`1fr_2fr`, `1fr_1fr`, etc.) to match content needs.
|
|
155
|
-
|
|
156
|
-
## Key Tailwind Classes
|
|
157
|
-
|
|
158
|
-
| Class | Purpose |
|
|
159
|
-
| ------------------------ | -------------------------------------------- |
|
|
160
|
-
| `h-screen w-screen` | Full viewport |
|
|
161
|
-
| `overflow-hidden` | Prevent scrolling (apply to root and panels) |
|
|
162
|
-
| `grid-rows-[auto_1fr]` | Menubar + fill content |
|
|
163
|
-
| `grid-cols-[300px_1fr]` | Fixed sidebar + fluid main |
|
|
164
|
-
| `border-b border-border` | Semantic border for menubar |
|
|
165
|
-
| `bg-background` | Themed background |
|
|
166
|
-
|
|
167
|
-
## Complete Example
|
|
168
|
-
|
|
169
|
-
```svelte
|
|
170
|
-
<!-- src/routes/+page.svelte -->
|
|
171
|
-
<script>
|
|
172
|
-
import Menubar from '@archetypeai/ds-ui-svelte-labs/primitives/menubar';
|
|
173
|
-
import { Button } from '@archetypeai/ds-ui-svelte-console/primitives/button';
|
|
174
|
-
import { Card, CardHeader, CardTitle, CardContent } from '@archetypeai/ds-ui-svelte-console/primitives/card';
|
|
175
|
-
</script>
|
|
176
|
-
|
|
177
|
-
<div
|
|
178
|
-
class="bg-background text-foreground grid h-screen w-screen grid-rows-[auto_1fr] overflow-hidden"
|
|
179
|
-
>
|
|
180
|
-
<Menubar>
|
|
181
|
-
<Button variant="link" class="text-muted-foreground">Send Report</Button>
|
|
182
|
-
</Menubar>
|
|
183
|
-
|
|
184
|
-
<main class="grid grid-cols-2 grid-rows-2 gap-4 overflow-hidden p-4">
|
|
185
|
-
<Card class="max-h-full">
|
|
186
|
-
<CardHeader><CardTitle>Panel 1</CardTitle></CardHeader>
|
|
187
|
-
<CardContent><!-- content --></CardContent>
|
|
188
|
-
</Card>
|
|
189
|
-
<Card class="max-h-full">
|
|
190
|
-
<CardHeader><CardTitle>Panel 2</CardTitle></CardHeader>
|
|
191
|
-
<CardContent><!-- content --></CardContent>
|
|
192
|
-
</Card>
|
|
193
|
-
<Card class="max-h-full">
|
|
194
|
-
<CardHeader><CardTitle>Panel 3</CardTitle></CardHeader>
|
|
195
|
-
<CardContent><!-- content --></CardContent>
|
|
196
|
-
</Card>
|
|
197
|
-
<Card class="max-h-full">
|
|
198
|
-
<CardHeader><CardTitle>Panel 4</CardTitle></CardHeader>
|
|
199
|
-
<CardContent><!-- content --></CardContent>
|
|
200
|
-
</Card>
|
|
201
|
-
</main>
|
|
202
|
-
</div>
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
## Populating Panels
|
|
206
|
-
|
|
207
|
-
Panels should contain components, not raw markup. Before building new components:
|
|
208
|
-
|
|
209
|
-
1. Read `ds-manifest.json` to discover available components in both tiers. Each has a `description` summarizing its purpose. If one fits, use it.
|
|
210
|
-
2. If no existing component fits, create one via `@skills/build-component`
|
|
211
|
-
3. Each panel should contain one primary component with clear props for data flow
|
|
212
|
-
|
|
213
|
-
This keeps dashboards composable and consistent with the design system.
|
|
214
|
-
|
|
215
|
-
## Reference
|
|
216
|
-
|
|
217
|
-
See `@rules/styling.md` for:
|
|
218
|
-
|
|
219
|
-
- Complete semantic token reference
|
|
220
|
-
- Tailwind v4 specifics and responsive patterns
|
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: deploy-worker
|
|
3
|
-
description: Deploys a SvelteKit project to Cloudflare Workers with CI/CD auto-deploy on merge to main. Use when deploying a project, setting up wrangler configuration, running a local worker dev server, managing secrets, configuring environments, or when the user mentions "deploy", "cloudflare", "worker", "wrangler", or "production".
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Deploying a Worker
|
|
7
|
-
|
|
8
|
-
Deploy SvelteKit projects built with the design system to Cloudflare Workers with GitHub Actions CI/CD that auto-deploys on merge to main.
|
|
9
|
-
|
|
10
|
-
## Prerequisites
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
wrangler --version # Requires v4.x+
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
If not installed:
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
npm install -D wrangler@latest
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Authenticate:
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
wrangler login
|
|
26
|
-
wrangler whoami # Verify
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## SvelteKit Adapter Setup
|
|
30
|
-
|
|
31
|
-
Install the Cloudflare adapter:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
npm install -D @sveltejs/adapter-cloudflare
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
Update `svelte.config.js`:
|
|
38
|
-
|
|
39
|
-
```javascript
|
|
40
|
-
import adapter from '@sveltejs/adapter-cloudflare';
|
|
41
|
-
|
|
42
|
-
/** @type {import('@sveltejs/kit').Config} */
|
|
43
|
-
const config = {
|
|
44
|
-
kit: {
|
|
45
|
-
adapter: adapter()
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export default config;
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
## Wrangler Configuration
|
|
53
|
-
|
|
54
|
-
Create `wrangler.jsonc` in the project root:
|
|
55
|
-
|
|
56
|
-
```jsonc
|
|
57
|
-
{
|
|
58
|
-
"$schema": "./node_modules/wrangler/config-schema.json",
|
|
59
|
-
"name": "my-app",
|
|
60
|
-
"main": ".svelte-kit/cloudflare/_worker.js",
|
|
61
|
-
"compatibility_date": "2026-01-01",
|
|
62
|
-
"compatibility_flags": ["nodejs_compat_v2"],
|
|
63
|
-
|
|
64
|
-
// Static assets from SvelteKit build
|
|
65
|
-
"assets": {
|
|
66
|
-
"directory": ".svelte-kit/cloudflare",
|
|
67
|
-
"binding": "ASSETS"
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
// Environment variables
|
|
71
|
-
"vars": {
|
|
72
|
-
"ENVIRONMENT": "production"
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
// Environments
|
|
76
|
-
"env": {
|
|
77
|
-
"staging": {
|
|
78
|
-
"name": "my-app-staging",
|
|
79
|
-
"vars": { "ENVIRONMENT": "staging" }
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
> **Note**: Existing projects may use `wrangler.toml` instead of `wrangler.jsonc`. Both work, but JSONC is recommended for new projects as newer wrangler features are JSON-only.
|
|
86
|
-
|
|
87
|
-
## Build and Initial Deploy
|
|
88
|
-
|
|
89
|
-
```bash
|
|
90
|
-
# Build the SvelteKit app
|
|
91
|
-
npm run build
|
|
92
|
-
|
|
93
|
-
# Dry run first to validate
|
|
94
|
-
wrangler deploy --dry-run
|
|
95
|
-
|
|
96
|
-
# Deploy to Cloudflare
|
|
97
|
-
wrangler deploy
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
## CI/CD Auto-Deploy
|
|
101
|
-
|
|
102
|
-
Always set up GitHub Actions so the project auto-deploys when changes are merged into main.
|
|
103
|
-
|
|
104
|
-
Create `.github/workflows/deploy.yml`:
|
|
105
|
-
|
|
106
|
-
```yaml
|
|
107
|
-
name: Deploy
|
|
108
|
-
on:
|
|
109
|
-
push:
|
|
110
|
-
branches: [main]
|
|
111
|
-
|
|
112
|
-
jobs:
|
|
113
|
-
deploy:
|
|
114
|
-
runs-on: ubuntu-latest
|
|
115
|
-
steps:
|
|
116
|
-
- uses: actions/checkout@v4
|
|
117
|
-
- uses: actions/setup-node@v4
|
|
118
|
-
with:
|
|
119
|
-
node-version: 20
|
|
120
|
-
- run: npm ci
|
|
121
|
-
- run: npm run build
|
|
122
|
-
- run: npx wrangler deploy
|
|
123
|
-
env:
|
|
124
|
-
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
Required secret: `CLOUDFLARE_API_TOKEN` with Workers permissions. Remind the user to add this to their GitHub repo under Settings > Secrets and variables > Actions.
|
|
128
|
-
|
|
129
|
-
If the user has a staging environment, extend the workflow:
|
|
130
|
-
|
|
131
|
-
```yaml
|
|
132
|
-
on:
|
|
133
|
-
push:
|
|
134
|
-
branches: [main, staging]
|
|
135
|
-
|
|
136
|
-
# In the deploy step:
|
|
137
|
-
- run: npx wrangler deploy ${{ github.ref_name == 'staging' && '--env staging' || '' }}
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
## Local Development
|
|
141
|
-
|
|
142
|
-
```bash
|
|
143
|
-
# SvelteKit dev server (preferred for development)
|
|
144
|
-
npm run dev
|
|
145
|
-
|
|
146
|
-
# Worker dev server (test Cloudflare-specific behavior)
|
|
147
|
-
npm run build && wrangler dev
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
Use `wrangler dev` when you need to test:
|
|
151
|
-
|
|
152
|
-
- Cloudflare bindings (KV, R2, D1)
|
|
153
|
-
- Worker-specific routing
|
|
154
|
-
- Production-like behavior
|
|
155
|
-
|
|
156
|
-
## Secrets
|
|
157
|
-
|
|
158
|
-
Never commit secrets to config. Use wrangler secrets for production and `.dev.vars` for local dev.
|
|
159
|
-
|
|
160
|
-
```bash
|
|
161
|
-
# Set a secret
|
|
162
|
-
wrangler secret put API_KEY
|
|
163
|
-
|
|
164
|
-
# List secrets
|
|
165
|
-
wrangler secret list
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
For local development, create `.dev.vars` (gitignored):
|
|
169
|
-
|
|
170
|
-
```
|
|
171
|
-
API_KEY=local-dev-key
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
## Environments
|
|
175
|
-
|
|
176
|
-
Deploy to staging or production:
|
|
177
|
-
|
|
178
|
-
```bash
|
|
179
|
-
# Deploy to staging
|
|
180
|
-
wrangler deploy --env staging
|
|
181
|
-
|
|
182
|
-
# Deploy to production (default)
|
|
183
|
-
wrangler deploy
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
## Observability
|
|
187
|
-
|
|
188
|
-
```bash
|
|
189
|
-
# Stream live logs
|
|
190
|
-
wrangler tail
|
|
191
|
-
|
|
192
|
-
# Filter by errors
|
|
193
|
-
wrangler tail --status error
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
Enable in config:
|
|
197
|
-
|
|
198
|
-
```jsonc
|
|
199
|
-
{
|
|
200
|
-
"observability": {
|
|
201
|
-
"enabled": true,
|
|
202
|
-
"head_sampling_rate": 1
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
## Rollback
|
|
208
|
-
|
|
209
|
-
```bash
|
|
210
|
-
# List recent versions
|
|
211
|
-
wrangler versions list
|
|
212
|
-
|
|
213
|
-
# Rollback to previous version
|
|
214
|
-
wrangler rollback
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
## Checklist
|
|
218
|
-
|
|
219
|
-
- [ ] `@sveltejs/adapter-cloudflare` installed
|
|
220
|
-
- [ ] `svelte.config.js` uses the Cloudflare adapter
|
|
221
|
-
- [ ] `wrangler.jsonc` exists with correct `name` and `compatibility_date`
|
|
222
|
-
- [ ] `npm run build` succeeds
|
|
223
|
-
- [ ] `wrangler deploy --dry-run` passes
|
|
224
|
-
- [ ] `.github/workflows/deploy.yml` created with auto-deploy on merge to main
|
|
225
|
-
- [ ] User reminded to set `CLOUDFLARE_API_TOKEN` in GitHub repo secrets
|
|
226
|
-
- [ ] Secrets set via `wrangler secret put` (not in config)
|
|
227
|
-
- [ ] `.dev.vars` gitignored
|
|
228
|
-
|
|
229
|
-
## Reference
|
|
230
|
-
|
|
231
|
-
See [references/wrangler-commands.md](references/wrangler-commands.md) for the full wrangler CLI reference including KV, R2, D1, Vectorize, Hyperdrive, Workers AI, Queues, Containers, Workflows, Pipelines, and Secrets Store commands.
|