import { defineConfig } from './kazzle.types';
export default defineConfig({
/** 应用图标的路径,相对于仓库根目录。发布时上传到 CDN。 */
icon: 'icon.svg',
/** 应用组件 — 每个条目定义一个可部署单元。 */
components: [
{
name: 'My App',
type: 'process',
path: './components/process/index.ts',
runtime: { dev: 'bun run dev', run: 'bun run start' },
// 持久进程是长时间运行的服务器。平台在每个触发器的 `path` 处
// 向运行中的服务器发送触发器,使用
// `Authorization: Bearer ${KAZZLE_TRIGGER_SECRET}`。客户代码
// 在执行工作前验证标头。
processMode: 'persistent',
triggers: [
// 示例 cron — 取消注释并调整。5 字段,分钟精度。
// { name: 'hourly-sync', kind: 'schedule', schedule: '0 * * * *', path: '/cron/hourly-sync' },
// 示例 webhook — POST 到 /webhooks/{spaceId}/{appId}/My App/incoming
// { name: 'incoming', kind: 'webhook', path: '/webhook/incoming' },
],
},
],
});