260806_01_ENH: Agent Harness 연동 추가
This commit is contained in:
@@ -3,6 +3,7 @@ import path from "node:path";
|
||||
import { writeFile } from "node:fs/promises";
|
||||
import { KRI_REGISTRY_ITEMS, REGISTRY_BASE_URL } from "./constants.js";
|
||||
import { copyTemplate, ensureTargetDirectory, removeJenkinsfile, replacePlaceholders } from "./files.js";
|
||||
import { composeAgentHarness } from "./harness.js";
|
||||
import { run } from "./process.js";
|
||||
import type { CliOptions } from "./types.js";
|
||||
|
||||
@@ -58,6 +59,9 @@ export async function createProject(options: CliOptions): Promise<void> {
|
||||
|
||||
await replacePlaceholders(options.targetDir, {
|
||||
"__PROJECT_NAME__": options.projectName,
|
||||
"__AGENT_PROJECT_ID__": options.agentProjectId,
|
||||
"__AGENT_PROJECT_NAME_YAML__": JSON.stringify(options.projectName),
|
||||
"__AGENT_PROJECT_TYPE__": options.projectType,
|
||||
"__DISPLAY_NAME__": options.displayName,
|
||||
"__DESCRIPTION__": options.description,
|
||||
"__PORT__": String(options.port),
|
||||
@@ -77,6 +81,7 @@ export async function createProject(options: CliOptions): Promise<void> {
|
||||
|
||||
if (!options.install) {
|
||||
console.log("[SKIP] npm install");
|
||||
await composeAgentHarness(options);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -103,12 +108,14 @@ export async function createProject(options: CliOptions): Promise<void> {
|
||||
if (options.build) {
|
||||
if (!options.installUi) {
|
||||
console.warn("[WARN] --skip-ui 때문에 typecheck/build를 생략합니다.");
|
||||
return;
|
||||
} else {
|
||||
console.log("\n[4/4] TypeScript 및 production build 검증");
|
||||
await run("npm", ["run", "typecheck"], options.targetDir);
|
||||
await run("npm", ["run", "build"], options.targetDir);
|
||||
}
|
||||
console.log("\n[4/4] TypeScript 및 production build 검증");
|
||||
await run("npm", ["run", "typecheck"], options.targetDir);
|
||||
await run("npm", ["run", "build"], options.targetDir);
|
||||
} else {
|
||||
console.log("[SKIP] typecheck/build");
|
||||
}
|
||||
|
||||
await composeAgentHarness(options);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user