📢 channel
📢 管理 Capgo Cloud 中应用更新的分发频道,控制如何将更新传递给设备。
别名: a
npx @capgo/cli@latest channel add➕ 在 Capgo Cloud 中创建新的应用分发频道以管理更新交付。
示例:
npx @capgo/cli@latest channel add production com.example.app --default选项:
| Param | Type | Description |
|---|---|---|
| -d, | string | 将频道设置为默认 |
| —self-assign | boolean | 允许设备自我分配到此频道 |
| -a, | string | 用于链接到您账户的 API 密钥 |
| —supa-host | string | 自定义 Supabase 主机 URL(用于自托管或 Capgo 开发) |
| —supa-anon | string | 自定义 Supabase anon 密钥(用于自托管) |
🗑️ Delete
Section titled “ 🗑️ Delete”别名: d
npx @capgo/cli@latest channel delete🗑️ 从 Capgo Cloud 删除频道,可选择删除相关 bundle 以释放资源。
示例:
npx @capgo/cli@latest channel delete production com.example.app选项:
| Param | Type | Description |
|---|---|---|
| -a, | string | 用于链接到您账户的 API 密钥 |
| —delete-bundle | boolean | 删除与频道关联的 bundle |
| —success-if-not-found | boolean | 如果未找到频道则成功 |
| —supa-host | string | 自定义 Supabase 主机 URL(用于自托管或 Capgo 开发) |
| —supa-anon | string | 自定义 Supabase anon 密钥(用于自托管) |
📋 List
Section titled “ 📋 List”别名: l
npx @capgo/cli@latest channel list📋 列出在 Capgo Cloud 中为应用配置的所有频道以查看分发设置。
示例:
npx @capgo/cli@latest channel list com.example.app选项:
| Param | Type | Description |
|---|---|---|
| -a, | string | 用于链接到您账户的 API 密钥 |
| —supa-host | string | 自定义 Supabase 主机 URL(用于自托管或 Capgo 开发) |
| —supa-anon | string | 自定义 Supabase anon 密钥(用于自托管) |
📦 CurrentBundle
Section titled “ 📦 CurrentBundle”npx @capgo/cli@latest channel currentBundle📦 获取链接到 Capgo Cloud 中特定频道的当前 bundle 以进行更新跟踪。
示例:
npx @capgo/cli@latest channel currentBundle production com.example.app选项:
| Param | Type | Description |
|---|---|---|
| -c, | string | 要从中获取当前 bundle 的频道 |
| -a, | string | 用于链接到您账户的 API 密钥 |
| —quiet | boolean | 仅打印 bundle 版本 |
| —supa-host | string | 自定义 Supabase 主机 URL(用于自托管或 Capgo 开发) |
| —supa-anon | string | 自定义 Supabase anon 密钥(用于自托管) |
⚙️ Set
Section titled “ ⚙️ Set”别名: s
npx @capgo/cli@latest channel set⚙️ 配置频道设置,例如链接 bundle、设置更新策略(major、minor、metadata、patch、none)或设备定位(iOS、Android、dev、emulator)。 必须有一个频道为默认。
示例:
npx @capgo/cli@latest channel set production com.example.app --bundle 1.0.0 --state default选项:
| Param | Type | Description |
|---|---|---|
| -a, | string | 用于链接到您账户的 API 密钥 |
| -b, | string | 要设置的文件的 bundle 版本号 |
| -s, | string | 设置频道的状态,default 或 normal |
| —latest-remote | boolean | 获取 capgo cloud 中上传的最新 bundle 并将其设置到频道 |
| —latest | boolean | 获取 package.json 中的最新版本密钥并将其设置到频道 |
| —downgrade | boolean | 允许降级到原生版本以下的版本 |
| —no-downgrade | boolean | 禁止降级到原生版本以下的版本 |
| —ios | boolean | 允许向 iOS 设备发送更新 |
| —no-ios | boolean | 禁止向 iOS 设备发送更新 |
| —android | boolean | 允许向 Android 设备发送更新 |
| —no-android | boolean | 禁止向 Android 设备发送更新 |
| —self-assign | boolean | 允许设备自我分配到此频道 |
| —no-self-assign | boolean | 禁止设备自我分配到此频道 |
| —disable-auto-update | string | 按类型阻止更新:major、minor、metadata、patch 或 none(允许所有) |
| —dev | boolean | 允许向开发设备发送更新 |
| —no-dev | boolean | 禁止向开发设备发送更新 |
| —emulator | boolean | 允许向模拟器设备发送更新 |
| —no-emulator | boolean | 禁止向模拟器设备发送更新 |
| —package-json | string | monorepo 的 package.json 文件路径(逗号分隔) |
| —ignore-metadata-check | boolean | 如果 bundle 中存在 node_modules,则忽略检查其兼容性 |
| —supa-host | string | 自定义 Supabase 主机 URL(用于自托管或 Capgo 开发) |
| —supa-anon | string | 自定义 Supabase anon 密钥(用于自托管) |