Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Remove coloring from incoming build logs
Jakub Novakd24953b4d3dc
diff --git a/packages/cli/package.json b/packages/cli/package.jsonindex 146ed4168..937b862e2 100644--- a/packages/cli/package.json+++ b/packages/cli/package.json@@ -58,6 +58,7 @@"common-tags": "^1.8.2","ignore": "^5.2.4","open": "^9.1.0",+ "strip-ansi": "^7.1.0","tar-fs": "^3.0.4","update-notifier": "5.1.0","yup": "^1.3.2"diff --git a/packages/cli/src/commands/template/build.ts b/packages/cli/src/commands/template/build.tsindex fd5a95b4d..17df6f704 100644--- a/packages/cli/src/commands/template/build.ts+++ b/packages/cli/src/commands/template/build.ts@@ -3,6 +3,7 @@ import * as commonTags from 'common-tags'import * as fs from 'fs'import * as path from 'path'import * as e2b from '@e2b/sdk'+import * as stripAnsi from 'strip-ansi'import { wait } from 'src/utils/wait'import { ensureAccessToken } from 'src/api'@@ -205,7 +206,7 @@ async function waitForBuildFinish(switch (template.data.status) {case 'building':template.data.logs.forEach((line) =>- process.stdout.write(asBuildLogs(line)),+ process.stdout.write(asBuildLogs(stripAnsi.default(line))),)breakcase 'ready':@@ -218,7 +219,7 @@ async function waitForBuildFinish(case 'error':template.data.logs.forEach((line) =>- process.stdout.write(asBuildLogs(line)),+ process.stdout.write(asBuildLogs(stripAnsi.default(line))),)throw new Error(`\n❌ Building sandbox template ${asFormattedSandboxTemplate(diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 69eac432d..7dfa346c2 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -220,7 +220,7 @@ importers:version: 20.8.10'@types/react':specifier: latest- version: 18.2.33+ version: 18.2.36'@types/react-dom':specifier: latestversion: 18.2.8@@ -263,6 +263,9 @@ importers:open:specifier: ^9.1.0version: 9.1.0+ strip-ansi:+ specifier: ^7.1.0+ version: 7.1.0tar-fs:specifier: ^3.0.4version: 3.0.4@@ -2922,14 +2925,6 @@ packages:csstype: 3.1.2dev: false- /@types/[email protected]:- resolution: {integrity: sha512-v+I7S+hu3PIBoVkKGpSYYpiBT1ijqEzWpzQD62/jm4K74hPpSP7FF9BnKG6+fg2+62weJYkkBWDJlZt5JO/9hg==}- dependencies:- '@types/prop-types': 15.7.6- '@types/scheduler': 0.16.3- csstype: 3.1.2- dev: true-/@types/[email protected]:resolution: {integrity: sha512-o9XFsHYLLZ4+sb9CWUYwHqFVoG61SesydF353vFMMsQziiyRu8np4n2OYMUSDZ8XuImxDr9c5tR7gidlH29Vnw==}dependencies: