4516cdee4b
- landing/: Next.js 15 app for arcrun.dev (dashboard, integrations, API docs, login). Deploys via Cloudflare Pages — CI scan skips this via pages_build_output_dir marker. - builtins/: minimal Hono Worker at arcrun-builtins (/init for one-shot component registry seeding). initComponents logic is flagged stale in src/index.ts for future rewrite. - BETA_TEST.md: pre-launch validation playbook. - README.md: updated to match current arcrun.dev / acr CLI flow. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
28 lines
879 B
TypeScript
28 lines
879 B
TypeScript
// u6u-builtins Worker
|
|
// 所有零件已遷移至 u6u-core/registry/components/ 的 TinyGo .wasm 版本
|
|
// 此 Worker 保留 /init 端點供初始化 Component Registry 使用
|
|
|
|
import { Hono } from 'hono';
|
|
import { cors } from 'hono/cors';
|
|
import type { Bindings } from './types';
|
|
import { initComponents } from './actions/initComponents';
|
|
|
|
const app = new Hono<{ Bindings: Bindings }>();
|
|
app.use('*', cors());
|
|
|
|
app.get('/', c => c.json({
|
|
service: 'u6u-builtins',
|
|
version: '2.0.0',
|
|
status: 'ok',
|
|
note: '所有零件已遷移至 WASM,請使用 Component Registry',
|
|
}));
|
|
|
|
// POST /init — 把所有零件上架到 Component Registry(冪等,可重複執行)
|
|
app.post('/init', async c => {
|
|
const result = await initComponents(c.env);
|
|
const allOk = result.failed === 0;
|
|
return c.json({ success: allOk, ...result }, allOk ? 200 : 207);
|
|
});
|
|
|
|
export default app;
|