mirror of
https://github.com/openclaw/openclaw.git
synced 2026-10-03 01:29:56 +00:00
refactor(scripts): share npm verification command execution (#162978)
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
This commit is contained in:
parent
8e94badda3
commit
98d3fdae44
2 changed files with 2 additions and 13 deletions
|
|
@ -1080,7 +1080,7 @@ function readBundledExtensionPackageJsons(packageRoot: string): {
|
|||
return { manifests, errors };
|
||||
}
|
||||
|
||||
function npmExec(args: string[], cwd: string): string {
|
||||
export function npmExec(args: string[], cwd: string): string {
|
||||
const invocation = resolveNpmCommandInvocation({
|
||||
npmArgs: args,
|
||||
npmExecPath: process.env.npm_execpath,
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ import { runInstalledWorkspaceBootstrapSmoke } from "./lib/workspace-bootstrap-s
|
|||
import {
|
||||
collectInstalledPackageErrors,
|
||||
normalizeInstalledBinaryVersion,
|
||||
npmExec,
|
||||
resolveInstalledBinaryCommandInvocation,
|
||||
} from "./openclaw-npm-postpublish-verify.ts";
|
||||
import { resolveNpmCommandInvocation } from "./openclaw-npm-release-check.ts";
|
||||
import { buildCmdExeCommandLine, resolveWindowsCmdExePath } from "./windows-cmd-helpers.mjs";
|
||||
|
||||
type InstalledPackageJson = {
|
||||
|
|
@ -113,17 +113,6 @@ function readPackedPackageJson(tarballPath: string): PackedPackageJson {
|
|||
) as PackedPackageJson;
|
||||
}
|
||||
|
||||
function npmExec(args: string[], cwd: string): string {
|
||||
const invocation = resolveNpmCommandInvocation({
|
||||
npmArgs: args,
|
||||
npmExecPath: process.env.npm_execpath,
|
||||
nodeExecPath: process.execPath,
|
||||
platform: process.platform,
|
||||
});
|
||||
|
||||
return runNpmVerifyCommand(invocation, cwd);
|
||||
}
|
||||
|
||||
function main(argv = process.argv.slice(2)): void {
|
||||
const args = parseOpenClawNpmPrepublishVerifyArgs(argv);
|
||||
if (args.help) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue