catalyst-slate
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseHow It Works
工作原理
- Check if Slate is activated — Use MCP: call with the project ID.
CatalystbyZoho_List_All_Slate_Apps- If it returns apps or an empty list → Slate is activated. Proceed.
- If it returns an error or "not found" → Slate needs a one-time activation. Tell the user:
"Please open the Catalyst console, go to your project → Slate (left sidebar) → click Start Exploring. This is a one-time step that takes 5 seconds. Let me know when done and I'll continue." Wait for confirmation, then proceed.
- Never fall back to Web Client (legacy) because Slate isn't activated yet. Web Client is deprecated — Slate is always the right choice for frontend hosting. The one-time activation is not a reason to change the approach.
If Slate was not selected during, runcatalyst initimmediately after init. This command updatescatalyst slate:create --name <name> --framework <framework> --defaultand prompts for the source directory automatically — it is faster than manual setup and should be the default recommendation.catalyst.json - Check if Slate app exists — If no app exists yet, run to scaffold one. If Slate was not selected during
catalyst slate:create --name <name> --framework <framework> -ni, run this immediately after init.catalyst init - Load — for framework setup,
references/slate-basics.mdformat, and baseUrl configuration.slate-config.toml - Cross-domain calls — If the query involves calling functions from a Slate app, apply the full URL + + CORS whitelist pattern.
generateAuthToken()⚠️ Migrating from basic client hosting? Relative paths likethat worked in basic client silently break on Slate — Slate is served from/server/fn/executewhile functions are on*.onslate.com. Every function call must become an absolute URL. Find and replace all relative*.catalystserverless.compaths with the full/server/...URL and addhttps://<project>.catalystserverless.com/server/...headers.generateAuthToken() - Deploy — deploys to the current environment. Preview URLs are available after the build completes.
catalyst deploy slate <name> -ni
- 检查Slate是否已激活 — 使用MCP:调用并传入项目ID。
CatalystbyZoho_List_All_Slate_Apps- 如果返回应用列表或空列表 → Slate已激活,继续操作。
- 如果返回错误或“未找到” → Slate需要一次性激活。告知用户:
“请打开Catalyst控制台,进入您的项目→Slate(左侧边栏)→点击开始探索。这是仅需5秒的一次性操作。完成后请告知我,我会继续协助您。” 等待用户确认后再继续。
- 切勿因Slate未激活而退回到Web Client(旧版)。Web Client已被弃用——Slate始终是前端托管的正确选择。一次性激活并非更换方案的理由。
如果在期间未选择Slate,请在初始化后立即运行catalyst init。此命令会更新catalyst slate:create --name <name> --framework <framework> --default并自动提示输入源目录——比手动设置更快,应作为默认推荐方案。catalyst.json - 检查Slate应用是否存在 — 如果尚未创建应用,运行来搭建一个。如果在
catalyst slate:create --name <name> --framework <framework> -ni期间未选择Slate,请在初始化后立即运行此命令。catalyst init - 加载— 用于框架设置、
references/slate-basics.md格式配置以及baseUrl配置。slate-config.toml - 跨域调用 — 如果查询涉及从Slate应用调用函数,请应用完整URL + + CORS白名单模式。
generateAuthToken()⚠️ 从基础客户端托管迁移? 在基础客户端中可用的相对路径(如)在Slate上会静默失效——Slate托管在/server/fn/execute,而函数托管在*.onslate.com。所有函数调用必须改为绝对URL。将所有相对*.catalystserverless.com路径替换为完整的/server/...URL,并添加https://<project>.catalystserverless.com/server/...请求头。generateAuthToken() - 部署 — 会部署到当前环境。构建完成后即可获取预览URL。
catalyst deploy slate <name> -ni
Triggers
触发条件
Use this skill for: "Slate", "frontend hosting", , , "deploy React app", "Slate framework", , , "frontend on Catalyst", "Slate vs Vercel", "cross-domain Slate to function", "Slate baseUrl", "Next.js on Catalyst", or "static frontend on Catalyst".
catalyst slateslate-config.tomlslate:createslate deploy当涉及以下内容时使用此技能:"Slate"、"frontend hosting"、、、"deploy React app"、"Slate framework"、、、"frontend on Catalyst"、"Slate vs Vercel"、"cross-domain Slate to function"、"Slate baseUrl"、"Next.js on Catalyst"或"static frontend on Catalyst"。
catalyst slateslate-config.tomlslate:createslate deployReferences
参考资料
| Reference | Load when the query is about… |
|---|---|
| Framework setup, |
| 参考资料 | 当查询涉及以下内容时加载… |
|---|---|
| 框架设置、 |