for (const group of requiredPreparedPathGroups) { if (group.some((path) => normalizedFiles.has(path))) { continue;
}
errors.push(`missing required prepared artifact: ${group.join(" or ")}`);
}
if (!normalizedAssets.values().next().done) { return errors;
}
errors.push(`missing prepared Control UI asset payload under ${requiredControlUiAssetPrefix}`); return errors;
}
const files = new Set<string>(); for (const group of requiredPreparedPathGroups) { for (const path of group) { if (reader.existsSync(path)) {
files.add(path);
}
}
}
return {
files,
assets,
};
}
function ensurePreparedArtifacts(): void { try { const preparedFiles = collectPreparedFilePaths(); const errors = collectPreparedPrepackErrors(preparedFiles.files, preparedFiles.assets); if (errors.length === 0) {
console.error("prepack: using existing prepared artifacts."); return;
} for (const error of errors) {
console.error(`prepack: ${error}`);
}
} catch (error) { const message = formatErrorMessage(error);
console.error(`prepack: failed to verify prepared artifacts: ${message}`);
}
console.error( "prepack: requires an existing build and Control UI bundle. Run `pnpm build && pnpm ui:build` before packing or publishing.",
);
process.exit(1);
}
function run(command: string, args: string[]): void { const result = spawnSync(command, args, {
stdio: "inherit",
env: process.env,
}); if (result.status === 0) { return;
}
process.exit(result.status ?? 1);
}
function runBuildSmoke(): void {
run(process.execPath, ["scripts/test-built-bundled-channel-entry-smoke.mjs"]);
}
async function writeDistInventory(): Promise<void> {
await writePackageDistInventory(process.cwd());
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.