diff --git a/src/build-webon/build-webon.ts b/src/build-webon/build-webon.ts index f7aa436..99c158c 100644 --- a/src/build-webon/build-webon.ts +++ b/src/build-webon/build-webon.ts @@ -1,4 +1,4 @@ -import { checkDir, logFatal } from "../util/util"; +import { checkDir, getDebugPath, logFatal } from "../util/util"; import { existsSync, mkdirSync, unlinkSync, renameSync } from "fs"; import * as path from "path"; import tar from "tar"; @@ -66,7 +66,11 @@ export async function buildWebOn(assetDir: string): Promise { try { await createTarFile(outDirPath, tarFilePath); - console.log("\x1b[32m", "Build and packaging completed!", "\x1b[0m"); + console.log( + "\x1b[32m", + "WebOn build completed: " + getDebugPath(tarFilePath), + "\x1b[0m" + ); } catch (error) { console.error(`Error during build: ${error}`); } @@ -76,9 +80,7 @@ async function createTarFile( outDirPath: string, tarFilePath: string ): Promise { - console.log( - `Creating new webon ${path.basename(tarFilePath)}: ${tarFilePath}` - ); + console.log(`Creating WebOn: ${tarFilePath}`); try { await tar.create( { diff --git a/test/e2e/build-webon-test/packaging-completed.test.ts b/test/e2e/build-webon-test/packaging-completed.test.ts index 2d0f65c..db23516 100644 --- a/test/e2e/build-webon-test/packaging-completed.test.ts +++ b/test/e2e/build-webon-test/packaging-completed.test.ts @@ -6,7 +6,7 @@ import { test("nextjs_sample tar.gz build", async () => { const output = await runE2ETest("build test_assets/nextjs_sample/out/"); - expect(output).toContain("Build and packaging completed!"); + expect(output).toContain("WebOn build completed: "); const existsFile = fs.existsSync("test_assets/nextjs_sample/out/nomo.tar.gz"); expect(existsFile).toBe(true); await new Promise((resolve) => setTimeout(resolve, 5000)); @@ -15,7 +15,7 @@ test("nextjs_sample tar.gz build", async () => { test("cra_sample tar.gz build", async () => { const output = await runE2ETest("build test_assets/cra_sample/out/"); - expect(output).toContain("Build and packaging completed!"); + expect(output).toContain("WebOn build completed: "); const existsFile = fs.existsSync("test_assets/cra_sample/out/nomo.tar.gz"); expect(existsFile).toBe(true); fs.unlinkSync("test_assets/cra_sample/out/nomo.tar.gz");