fix(cli): build runtime assets during dev setup

This commit is contained in:
Andrey Avtomonov 2026-05-17 00:47:27 +02:00
parent c7e6b5001d
commit 2ccefa57e4
6 changed files with 85 additions and 7 deletions

View file

@ -942,6 +942,16 @@ async function buildArtifacts(layout) {
await assertPathExists(artifactManifestPath(layout), 'artifact manifest');
}
async function buildRuntimeWheelAssets(layout) {
await rm(layout.pythonDir, { recursive: true, force: true });
await mkdir(layout.pythonDir, { recursive: true });
const [, wheelCommand] = buildArtifactCommands(layout);
await runCommand(wheelCommand.command, wheelCommand.args, { cwd: wheelCommand.cwd });
const pythonArtifacts = await findPythonArtifacts(layout.pythonDir);
await copyRuntimeWheelAssets(layout, pythonArtifacts);
}
async function verifyNpmArtifacts(layout, tmpRoot) {
for (const packageInfo of NPM_ARTIFACT_PACKAGES) {
await assertPathExists(layout.npmTarballs[packageInfo.name], `${packageInfo.name} tarball`);
@ -1011,6 +1021,10 @@ async function main() {
await buildArtifacts(layout);
return;
}
if (command === 'build-runtime') {
await buildRuntimeWheelAssets(layout);
return;
}
if (command === 'verify') {
await verifyArtifacts(layout);
return;