taubyte-resource-creation
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseResource Creation
资源创建
Preconditions
前置条件
- loaded
taubyte-core-constraints - completed
taubyte-scope-routing - completed for project (and application only if the task required it — do not assume an application exists)
taubyte-project-and-application - initialized
taubyte-context-log - available for server-side config/build logic
taubyte-build-runtime-config
- 已加载
taubyte-core-constraints - 已完成
taubyte-scope-routing - 已为项目完成(仅当任务需要时才完成应用部分——请勿假设应用已存在)
taubyte-project-and-application - 已初始化
taubyte-context-log - 可用于服务器端配置/构建逻辑
taubyte-build-runtime-config
Order
执行顺序
- Global / project-level resources first (domain, website, library) — no application step unless says otherwise.
taubyte-scope-routing - Application-scoped resources next (database, storage, messaging, service, smartops, and function only when scoped to an application) — run only when that phase actually applies; do not create an application for website-only or simple global function work.
tau select application
- 先创建全局/项目级资源(域名、网站、库)——除非另有说明,否则不执行应用步骤。
taubyte-scope-routing - 接下来创建应用作用域资源(数据库、存储、消息服务、服务、SmartOps,以及仅当作用域为应用时的函数)——仅当该阶段实际适用时才运行;对于仅网站或简单全局函数的工作,请勿创建应用。
tau select application
Rules
规则
- Use default non-interactive mode unless user requested interactive.
- For full flags, use .
taubyte-resource-flags-reference - Use for path-like flags in Git Bash.
MSYS_NO_PATHCONV=1 - Never use unless the user explicitly asks for a specific prefix value.
--generated-fqdn-prefix - If server-side config is needed, update ; if env vars are needed, declare them in
.taubyte/config.yamlonly (see.taubyte/build.sh). Validate both before push.taubyte-build-runtime-config - For Go function implementation correctness, apply .
taubyte-go-sdk-constraints - After creating a serverless function with , immediately edit the generated
--template emptywith a real implementation (do not leave scaffold code).empty.go - Website/library creation must use explicit repo strategy; never rely on implicit repo auto-selection.
- Deterministic default for generated repos:
- website:
tb_code_<project>_<website> - library:
tb_code_<project>_<library>
- website:
- Immediately import after creation to sync local repository clone:
tau import website --name <site>tau import library --name <lib>
- Immediately verify bound repo fullname/ID in config yaml after creation/import; if mismatch, stop and fix before any push.
- Update context log after every mutation.
- 除非用户要求交互模式,否则默认使用非交互模式。
- 如需完整标志,请使用。
taubyte-resource-flags-reference - 在Git Bash中,对类路径标志使用。
MSYS_NO_PATHCONV=1 - 除非用户明确要求特定前缀值,否则绝不使用。
--generated-fqdn-prefix - 若需要服务器端配置,请更新;若需要环境变量,仅在**
.taubyte/config.yaml**中声明(参见.taubyte/build.sh)。推送前需验证这两项内容。taubyte-build-runtime-config - 为确保Go函数实现正确,请应用。
taubyte-go-sdk-constraints - 使用创建无服务器函数后,立即编辑生成的
--template empty,添加实际实现代码(请勿保留脚手架代码)。empty.go - 创建网站/库时必须使用明确的仓库策略;绝不依赖隐式仓库自动选择。
- 生成仓库的确定性默认命名规则:
- 网站:
tb_code_<project>_<website> - 库:
tb_code_<project>_<library>
- 网站:
- 创建后立即导入以同步本地仓库克隆:
tau import website --name <site>tau import library --name <lib>
- 创建/导入后立即验证配置yaml中绑定的仓库全名/ID;若不匹配,在推送前停止操作并修复。
- 每次变更后更新上下文日志。