diff --git a/.changeset/silent-weeks-wash.md b/.changeset/silent-weeks-wash.md new file mode 100644 index 00000000..a59d75d5 --- /dev/null +++ b/.changeset/silent-weeks-wash.md @@ -0,0 +1,7 @@ +--- +'@modern-js/codesmith-api-app': patch +--- + +feat: custom install support show log + +feat: 自定义安装命令支持展示日志信息 diff --git a/packages/api/app/src/index.ts b/packages/api/app/src/index.ts index 3143a8ac..fa1d3df6 100644 --- a/packages/api/app/src/index.ts +++ b/packages/api/app/src/index.ts @@ -97,7 +97,13 @@ export class AppAPI { } let intallPromise; if (command) { - intallPromise = execa(command, [], { shell: true }); + intallPromise = execa(command, [], { + shell: true, + stdin: 'inherit', + stdout: 'inherit', + stderr: 'inherit', + ...(options || {}), + }); } else if (packageManager === 'pnpm') { intallPromise = this.npmApi.pnpmInstall({ ...(options || {}), useNvm }); } else if (packageManager === 'yarn') { @@ -327,7 +333,6 @@ export class AppAPI { configValue: Record = {}, validateMap: Record< string, - // eslint-disable-next-line max-lines ( input: unknown, data?: Record,