oneie 3.6.0 → 3.6.3
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/.claude/commands/deploy.md +77 -150
- package/.mcp.json +57 -0
- package/CREATE-WEBSITE.md +442 -0
- package/SECURITY.md +31 -0
- package/TESTING-ONBOARDING.md +185 -0
- package/dist/commands/create-website.d.ts +19 -0
- package/dist/commands/create-website.d.ts.map +1 -0
- package/dist/commands/create-website.js +231 -0
- package/dist/commands/create-website.js.map +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +116 -6
- package/dist/commands/init.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/folders.yaml +1 -1
- package/package.json +6 -1
|
@@ -1,195 +1,122 @@
|
|
|
1
1
|
---
|
|
2
|
-
allowed-tools: Bash(
|
|
3
|
-
description: Deploy
|
|
2
|
+
allowed-tools: Bash(*), Read(*), Edit(*)
|
|
3
|
+
description: Deploy web to Cloudflare Pages
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# /deploy - Deploy to Cloudflare Pages
|
|
6
|
+
# /deploy - Deploy Web to Cloudflare Pages
|
|
7
7
|
|
|
8
|
-
**Purpose:**
|
|
8
|
+
**Purpose:** Build and deploy the web application to Cloudflare Pages with zero-downtime deployment.
|
|
9
9
|
|
|
10
10
|
## How It Works
|
|
11
11
|
|
|
12
|
-
This command
|
|
13
|
-
1. Check if you have Cloudflare credentials configured
|
|
14
|
-
2. If not, provide step-by-step instructions to get them
|
|
15
|
-
3. Build your website
|
|
16
|
-
4. Deploy to Cloudflare Pages
|
|
17
|
-
5. Give you the live URL
|
|
12
|
+
This command builds the Astro web application and deploys it to Cloudflare Pages using wrangler.
|
|
18
13
|
|
|
19
|
-
|
|
14
|
+
**Deployment Flow:**
|
|
15
|
+
1. Navigate to web directory
|
|
16
|
+
2. Build production bundle (with React 19 edge support)
|
|
17
|
+
3. Deploy to Cloudflare Pages
|
|
18
|
+
4. Report deployment URL and status
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
### Step 1: Check for Cloudflare Credentials
|
|
24
|
-
|
|
25
|
-
Run this command to check if credentials are configured:
|
|
20
|
+
## Quick Deploy
|
|
26
21
|
|
|
27
22
|
```bash
|
|
28
|
-
|
|
23
|
+
# Build and deploy in one command
|
|
24
|
+
cd web && bun run build && wrangler pages deploy dist --project-name=web --commit-dirty=true
|
|
29
25
|
```
|
|
30
26
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
If the user doesn't have credentials, provide these instructions:
|
|
27
|
+
## Requirements
|
|
34
28
|
|
|
35
|
-
**
|
|
29
|
+
**Before deploying, ensure:**
|
|
30
|
+
- ✅ You're authenticated with wrangler: `wrangler login`
|
|
31
|
+
- ✅ React 19 edge alias is configured in `astro.config.mjs`
|
|
32
|
+
- ✅ Environment variables set in `wrangler.toml`
|
|
36
33
|
|
|
37
|
-
|
|
38
|
-
- Go to https://dash.cloudflare.com/profile/api-tokens
|
|
39
|
-
- Scroll to "API Keys" section
|
|
40
|
-
- Click "View" next to "Global API Key"
|
|
41
|
-
- Copy the key (you'll need to enter your Cloudflare password)
|
|
34
|
+
## Deployment URLs
|
|
42
35
|
|
|
43
|
-
**
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
- On the right side, you'll see "Account ID" - copy it
|
|
36
|
+
**Production:**
|
|
37
|
+
- Primary: https://web.one.ie (custom domain)
|
|
38
|
+
- Cloudflare: https://web-d3d.pages.dev
|
|
47
39
|
|
|
48
|
-
**
|
|
49
|
-
|
|
40
|
+
**Preview:**
|
|
41
|
+
- Auto-generated: https://[commit-hash].web-d3d.pages.dev
|
|
50
42
|
|
|
51
|
-
|
|
43
|
+
## Environment Configuration
|
|
52
44
|
|
|
53
|
-
|
|
45
|
+
### For ONE Platform (Default)
|
|
54
46
|
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
47
|
+
```toml
|
|
48
|
+
# wrangler.toml
|
|
49
|
+
ORG_NAME = "one"
|
|
50
|
+
ORG_WEBSITE = "https://one.ie"
|
|
51
|
+
ORG_FOLDER = "onegroup"
|
|
52
|
+
ONE_BACKEND = "on"
|
|
59
53
|
```
|
|
60
54
|
|
|
61
|
-
**
|
|
62
|
-
- The Global API Key provides **FULL CONTROL** over your Cloudflare account
|
|
63
|
-
- Never commit your `.env` file to git (it should already be in `.gitignore`)
|
|
64
|
-
- Never share these credentials with anyone
|
|
65
|
-
- This gives complete access to create, modify, and delete resources
|
|
66
|
-
|
|
67
|
-
Once you've added these to `.env`, run `/deploy` again to deploy your site!"
|
|
68
|
-
|
|
69
|
-
### Step 3: If Credentials Exist, Deploy
|
|
70
|
-
|
|
71
|
-
If credentials are found, proceed with deployment:
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
# 1. Build the website
|
|
75
|
-
cd web
|
|
76
|
-
echo "Building your website..."
|
|
77
|
-
bun run build
|
|
55
|
+
**Result:** Full ONE Platform homepage
|
|
78
56
|
|
|
79
|
-
|
|
80
|
-
echo ""
|
|
81
|
-
echo "Deploying to Cloudflare Pages..."
|
|
82
|
-
wrangler pages deploy dist --project-name=web --commit-dirty=true
|
|
57
|
+
### For Customer Organizations
|
|
83
58
|
|
|
84
|
-
|
|
59
|
+
```toml
|
|
60
|
+
# wrangler.toml (customer config)
|
|
61
|
+
ORG_NAME = "acme"
|
|
62
|
+
ORG_WEBSITE = "https://acme.com"
|
|
63
|
+
ORG_FOLDER = "acme"
|
|
64
|
+
ONE_BACKEND = "off" # Frontend-only
|
|
85
65
|
```
|
|
86
66
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
After deployment completes, tell the user:
|
|
90
|
-
|
|
91
|
-
**"✅ Deployment Complete!**
|
|
92
|
-
|
|
93
|
-
Your website is now live at:
|
|
94
|
-
- **Production**: https://web.one.ie (if custom domain configured)
|
|
95
|
-
- **Preview**: [URL from wrangler output]
|
|
96
|
-
|
|
97
|
-
**What Just Happened:**
|
|
98
|
-
1. Built your website (optimized for production)
|
|
99
|
-
2. Uploaded to Cloudflare Pages
|
|
100
|
-
3. Deployed to edge servers worldwide (330+ locations)
|
|
101
|
-
|
|
102
|
-
**Next Steps:**
|
|
103
|
-
- Test your live site
|
|
104
|
-
- Set up a custom domain (if desired)
|
|
105
|
-
- Configure CI/CD for automatic deployments
|
|
106
|
-
|
|
107
|
-
**Deployment Dashboard:**
|
|
108
|
-
https://dash.cloudflare.com → Pages → web
|
|
109
|
-
|
|
110
|
-
**To redeploy after changes:**
|
|
111
|
-
Just run `/deploy` again anytime!"
|
|
112
|
-
|
|
113
|
-
## Error Handling
|
|
114
|
-
|
|
115
|
-
### If Build Fails
|
|
67
|
+
**Result:** Customer homepage with GetStartedPrompt
|
|
116
68
|
|
|
117
|
-
|
|
118
|
-
"❌ Build failed. Please fix the errors above and try again.
|
|
69
|
+
## React 19 + Cloudflare Edge Fix
|
|
119
70
|
|
|
120
|
-
|
|
121
|
-
- TypeScript errors: Run `bunx astro check`
|
|
122
|
-
- Missing dependencies: Run `bun install`
|
|
123
|
-
- Configuration issues: Check `astro.config.mjs`"
|
|
71
|
+
**Critical:** Ensure `astro.config.mjs` has:
|
|
124
72
|
|
|
125
|
-
|
|
73
|
+
```javascript
|
|
74
|
+
resolve: {
|
|
75
|
+
alias: {
|
|
76
|
+
'react-dom/server': 'react-dom/server.edge',
|
|
77
|
+
},
|
|
78
|
+
}
|
|
79
|
+
```
|
|
126
80
|
|
|
127
|
-
|
|
81
|
+
Without this, deployment fails with `MessageChannel is not defined`.
|
|
128
82
|
|
|
129
|
-
|
|
83
|
+
## Common Issues
|
|
130
84
|
|
|
85
|
+
**MessageChannel error:**
|
|
131
86
|
```bash
|
|
132
|
-
|
|
87
|
+
# Fix: Add edge alias to astro.config.mjs
|
|
88
|
+
'react-dom/server': 'react-dom/server.edge'
|
|
133
89
|
```
|
|
134
90
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
If the project doesn't exist on Cloudflare Pages:
|
|
140
|
-
|
|
141
|
-
"The 'web' project doesn't exist yet. Let's create it:
|
|
142
|
-
|
|
143
|
-
1. Go to https://dash.cloudflare.com → Pages
|
|
144
|
-
2. Click "Create a project"
|
|
145
|
-
3. Name it 'web'
|
|
146
|
-
4. Skip the git connection for now
|
|
147
|
-
5. Run `/deploy` again
|
|
148
|
-
|
|
149
|
-
Or change the project name in the deploy command to match an existing project."
|
|
150
|
-
|
|
151
|
-
## Important Notes
|
|
152
|
-
|
|
153
|
-
**Security:**
|
|
154
|
-
- The `.env` file is excluded from git by default
|
|
155
|
-
- Your Global API Key gives full control - keep it secure
|
|
156
|
-
- Never log or display the actual key values
|
|
157
|
-
|
|
158
|
-
**Deployment:**
|
|
159
|
-
- First deployment may take 2-3 minutes
|
|
160
|
-
- Subsequent deployments are faster (~30 seconds)
|
|
161
|
-
- Changes are live on the edge network within seconds
|
|
162
|
-
|
|
163
|
-
**Custom Domains:**
|
|
164
|
-
- Add custom domains in Cloudflare Pages dashboard
|
|
165
|
-
- HTTPS is automatic and free
|
|
166
|
-
- DNS can be managed in Cloudflare
|
|
91
|
+
**Not authenticated:**
|
|
92
|
+
```bash
|
|
93
|
+
wrangler login
|
|
94
|
+
```
|
|
167
95
|
|
|
168
|
-
|
|
96
|
+
**Build errors:**
|
|
97
|
+
```bash
|
|
98
|
+
cd web && bunx astro check
|
|
99
|
+
```
|
|
169
100
|
|
|
170
|
-
|
|
101
|
+
## Customer Deployment
|
|
171
102
|
|
|
172
|
-
|
|
173
|
-
❌ No Cloudflare credentials found in .env
|
|
103
|
+
For customers deploying their own sites:
|
|
174
104
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
105
|
+
```bash
|
|
106
|
+
# 1. Install CLI
|
|
107
|
+
npx oneie
|
|
178
108
|
|
|
179
|
-
|
|
109
|
+
# 2. Configure (edit web/.env.local)
|
|
110
|
+
ORG_NAME=acme
|
|
111
|
+
ORG_WEBSITE=https://acme.com
|
|
112
|
+
ONE_BACKEND=off
|
|
180
113
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
🚀 Deploying to Cloudflare Pages...
|
|
186
|
-
✨ Upload complete
|
|
187
|
-
🌍 Deploying globally...
|
|
188
|
-
✅ Deployment complete!
|
|
189
|
-
|
|
190
|
-
Your site is live at: https://abc123.pages.dev
|
|
114
|
+
# 3. Deploy
|
|
115
|
+
cd web
|
|
116
|
+
bun run build
|
|
117
|
+
wrangler pages deploy dist --project-name=acme-web
|
|
191
118
|
```
|
|
192
119
|
|
|
193
120
|
---
|
|
194
121
|
|
|
195
|
-
**
|
|
122
|
+
**Deployment ready** 🚀
|
package/.mcp.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mcpServers": {
|
|
3
|
+
"shadcn": {
|
|
4
|
+
"command": "npx",
|
|
5
|
+
"args": [
|
|
6
|
+
"shadcn@latest",
|
|
7
|
+
"mcp"
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
"cloudflare-builds": {
|
|
11
|
+
"command": "npx",
|
|
12
|
+
"args": [
|
|
13
|
+
"-y",
|
|
14
|
+
"mcp-remote",
|
|
15
|
+
"https://builds.mcp.cloudflare.com/sse"
|
|
16
|
+
],
|
|
17
|
+
"env": {
|
|
18
|
+
"CLOUDFLARE_API_KEY": "${CLOUDFLARE_GLOBAL_API_KEY}",
|
|
19
|
+
"CLOUDFLARE_API_TOKEN": "${CLOUDFLARE_GLOBAL_API_KEY}"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"chrome-devtools": {
|
|
23
|
+
"command": "npx",
|
|
24
|
+
"args": [
|
|
25
|
+
"-y",
|
|
26
|
+
"chrome-devtools-mcp@latest"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"claude": {
|
|
30
|
+
"command": "npx",
|
|
31
|
+
"args": [
|
|
32
|
+
"-y",
|
|
33
|
+
"@anthropic-ai/mcp-server-claude"
|
|
34
|
+
],
|
|
35
|
+
"env": {
|
|
36
|
+
"ANTHROPIC_API_KEY": "${ANTHROPIC_API_KEY}"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"framelink-figma": {
|
|
40
|
+
"command": "npx",
|
|
41
|
+
"args": [
|
|
42
|
+
"-y",
|
|
43
|
+
"figma-developer-mcp",
|
|
44
|
+
"--figma-api-key=${FIGMA_ACCESS_TOKEN}",
|
|
45
|
+
"--stdio"
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"astro-docs": {
|
|
49
|
+
"transport": "http",
|
|
50
|
+
"url": "https://mcp.docs.astro.build/mcp"
|
|
51
|
+
},
|
|
52
|
+
"stripe": {
|
|
53
|
+
"transport": "http",
|
|
54
|
+
"url": "https://mcp.stripe.com/"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|