From bbb79f821ea64a1ae25d35beae68ca29ce2e0914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=9F=E6=9C=88?= Date: Tue, 12 May 2026 11:31:41 +0800 Subject: [PATCH] feat(init): generate bunfig.toml with Gitea scoped registry + fix versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - init workspace now generates bunfig.toml pointing @uncaged scope to Gitea - Fix template versions: "*" → "^0.3.1" (packages are now published) --- packages/cli-workflow/src/commands/init/templates.ts | 2 +- packages/cli-workflow/src/commands/init/workspace.ts | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/cli-workflow/src/commands/init/templates.ts b/packages/cli-workflow/src/commands/init/templates.ts index d2cf16e..9b3d787 100644 --- a/packages/cli-workflow/src/commands/init/templates.ts +++ b/packages/cli-workflow/src/commands/init/templates.ts @@ -6,7 +6,7 @@ export function templatePackageJson(templateName: string): string { private: true, type: "module", dependencies: { - "@uncaged/workflow-runtime": "*", + "@uncaged/workflow-runtime": "^0.3.1", zod: "^4.0.0", }, }, diff --git a/packages/cli-workflow/src/commands/init/workspace.ts b/packages/cli-workflow/src/commands/init/workspace.ts index c5a8711..49b8aa2 100644 --- a/packages/cli-workflow/src/commands/init/workspace.ts +++ b/packages/cli-workflow/src/commands/init/workspace.ts @@ -28,7 +28,7 @@ function workflowsPackageJson(): string { private: true, type: "module", dependencies: { - "@uncaged/workflow-runtime": "*", + "@uncaged/workflow-runtime": "^0.3.1", zod: "^4.0.0", }, }, @@ -157,6 +157,12 @@ uncaged-workflow add `; } +function bunfigToml(): string { + return `[install.scopes] +"@uncaged" = "https://git.shazhou.work/api/packages/shazhou/npm/" +`; +} + function readmeMd(workspaceName: string): string { return `# ${workspaceName} @@ -210,6 +216,7 @@ export async function cmdInitWorkspace( writeFile(join(rootPath, "README.md"), readmeMd(workspaceName), "utf8"), writeFile(join(rootPath, "templates", ".gitkeep"), "", "utf8"), writeFile(join(rootPath, "workflows", "package.json"), workflowsPackageJson(), "utf8"), + writeFile(join(rootPath, "bunfig.toml"), bunfigToml(), "utf8"), ]); return ok({ rootPath });